1. Andrew's Corner »
  2. Linux Explorations...

Using slrn and slrnpull under Ubuntu Linux

I have been using slrn for many years now and have written several guides for its installation and usage. Some of this information has been rolled into the slrn website, other information is on the Ubuntu Community Wiki, some on the Ubuntu Forums but I have decided to distill all of this writing here. The page is written specifically for my old friend Ubuntu and is designed so that an Ubuntu user with an interest in Usenet can get a modern version of slrn up and running easily, quickly and relatively simply. If I have accomplished this and you are happy with my work please use the email link at the base of this page for any comments or suggestions. And remember: "Have fun!".

First some preparation ...

slrn is a newsreader that encourages some careful preparation before installation. At the very least this preparation should consist of ensuring that your system has an unique Fully Qualified Domain Name (FQDN):

Setting an Unique Fully Qualified Domain Name

I would advise a few moments of careful thought to ensuring that your system has an unique Fully Qualified Domain Name (FQDN). On Ubuntu this can be seen by running hostname --fqdn. If this is not set correctly the Message-IDs (MIDs) that slrn generate may cause some comment and more importantly there is the possibility of newsgroup posts with the same Message-IDs colliding. By default Ubuntu does not come with a well configured FQDN and you will see in /etc/hosts something like this:	localhost	desktop

To fix this there are three good choices:

  1. If you legitimately own your own Domain Name use this in conjunction with a subdomain and the hostname of your computer. This is my own model and when yoou think how cheap Domain Names are these days I think it is the best choice.
  2. Use a service such as dyndns.org which will give you a domain name for $25 annually with the bonus of a Dynamic DNS service. And yes, it used to be free, now it has a small price but still great reliability.
  3. Use the news service individual.net which will give you a FQDN with your €10 membership. I have not tried this but the people at individual.net are highly reliable so I suspect this would also be a decent option.

When this is subsequently set in /etc/hosts you should see something like this:       localhost       desktop.your.domain     desktop

If slrn is to generate your Message-IDs (MIDs) the formula is a string consisting of "slrn", time, process id, user and hostname so it is advisable to set your FQDN accurately. And the bonus will be that you will look like you know what you are doing in the often very, very picky world of Usenet!

Compiling tools and an editor

By default there are no compilers in Ubuntu and these must be downloaded as well as a decent editor and the necessary -dev files for slrn. The following single command accomplishes this:

sudo apt-get install build-essential checkinstall vim libslang2-dev 

If you have not already done so this would probably be a very good time to learn how to use vim, perhaps by running the built-in vimtutor or by reading up on one of the many, many vim guides available online.

Download, Compile & Install slrn

October 23rd, 2016 saw the release of slrn 1.0.3, marking 22 years of development for this great command line Usenet client. It is strongly advised that you upgrade to this version that contains a small but significant list of bug fixes. First remove any installed repository versions:

sudo apt-get remove slrn slrnpull 

And now use the following single command to download the source code for the newest slrn, compile and install it:

mkdir $HOME/slrn_build && cd $HOME/slrn_build && \
wget http://jedsoft.org/releases/slrn/slrn-1.0.3a.tar.bz2 && \
tar xavf slrn-1.0.3a.tar.bz2 && cd slrn-1.0.3 && \
./configure --with-docdir=/usr/share/doc/slrn \
            --with-slrnpull=/var/spool/slrnpull \
            --with-server-file=/etc/nntpserver && \
make && \
sudo checkinstall --pakdir "$HOME/slrn_build" --backup=no --deldoc=yes \
                  --pkgname slrn --pkgversion "1.0.3" --fstrans=no \
                  --deldesc=yes --delspec=yes --default --provides "slrn,slrnpull" && \
make distclean && sudo ldconfig

This has installed a basic copy of both slrn and slrnpull and completes the first part of this guide. Now to configure slrn:

Configure slrn & slrnpull...

I have given some basic configuration below for slrn and slrnpull but be aware that this is only the most basic of suggestions, I encourage you to delve deeper into the configuration files and see what magic is possible! First for slrn:

Edit .slrnrc

Next step is to set the configuration file for slrn. There are several ways to go about this but the easiest is to copy the sample slrn configuration file that comes with the slrn installation to $HOME/.slrnrc. This can be done as follows:

zcat /usr/share/doc/slrn/examples/slrn.rc.gz > $HOME/.slrnrc

Now open the file with your favoured text editor and start editing! Linux dot files can consume an immense time in research and testing so Gentle Reader I have taken the liberty of suggesting a few basic settings below. This brief listing is by no means comprehensive, it is simply intended to furnish a starting point:

% Section 1: Tell slrn about your identity.

% Basic identification information which creates:
% From: Skywalker <luke@deathstar.invalid>
set username "luke"
set hostname "deathstar.invalid"
set realname "Skywalker"

% Section 2: Server specific settings.

set spool_inn_root	"/var/spool/slrnpull"
set spool_root		"/var/spool/slrnpull/news"
set spool_nov_root	"/var/spool/slrnpull/news"
set use_slrnpull 1
set read_active 1
set server_object 	"spool" 

% Section 3: External programs.

% Sets the external editor.
set editor_command "vim '+set tw=70' +%d '%s'"

% Sets Firefox for X and w3m for console only:
set Xbrowser "firefox '%s' &"
set non_Xbrowser "w3m '%s'"

Have a good look through this well-commented file, there are many, many options that can be slected or altered. I have only outlined the most basic and necessary. You will see that I have again selected vim as the editor for slrn, feel free to select another editor, as long as it is vim!

Preparing slrnpull

There are a few tasks to undertake before running slrnpull and first to setup the directory structure and place the appropriate configuration file in place:

sudo mkdir -pv /var/spool/slrnpull/{data,news,requests,out.going/rejects} && \
sudo cp -v /usr/share/doc/slrn/doc/slrnpull/slrnpull.conf /var/spool/slrnpull && \
sudo chmod -R 3777 /var/spool/slrnpull/out.going

Next open up the slrnpull.conf file that has been placed in the spool and place something like the following:

default				100     14     0

Read this file carefully and make sure that you comment out all of the example newsgroups in the file. This example will use two newsgroups and after downloading the 100 most recent messages it will then store them for 14 days before making them available for deletion. Feel free to alter all of these settings to suit your own Usenet usage! If your server requires authorisation information, you will need to create a file called "authinfo" in /var/spool/slrnpull which should consist of two lines: the first line is for the username and the second line is for the password. Something like the following should create the file, open it ready for editing and then set some safer permissions:

sudo vim /var/spool/slrnpull/authinfo
sudo chmod 0600 /var/spool/slrnpull/authinfo

And finally to show slrnpull the location of your news server create and open the file as follows:

sudo vim /etc/nntpserver

and place the address of your nntp server there. If you are not sure of a good server try individual.net who have been serving my newsgroups for many years now. Now with the preparation all done it is time to first fire up slrnpull and then slrn:

Pulling and reading the news

Finally the time has come to actually use slrn! slrnpull first needs to download posts from your news server and then slrn has to create the file $HOME/.jnewsrc:

sudo slrnpull
slrn --create

And now open up slrn, subscribe to the groups there and start spreading your wisdom around. I would strongly suggest news.software.readers where most of the slrn mafia can be found as well as alt.test where nobody really cares about any initial blundering around with slrn! Usenet can still be a lot of fun even though it is slowly fading away...

And in conclusion ...

I have found immense enjoyment in writing this page and my pleasure will be redoubled if you have profited by any of the material on this page. Send me an email and let me know! Perhaps also have a look at another page on this site that digs a little deeper into slrn usage, this time under Windows 10. Importantly I am still having a great and productive time in the world of Linux and I feel as if I have joined a community and am contributing to it. What about you?