|
This page has drawn heavily from information contained on the slrn website and the Ubuntu Forums slrn guide. Thanks to the authors of both of these for the generous permission to use their work!
What is slrn?
slrn ('S-Lang read news') is a console based newsreader which is used to access Usenet newsgroup messages. Beside the usual features of a newsreader slrn also supports scoring rules to highlight, sort or kill articles based on information from their header. It is highly customizable, allows free key-bindings and can easily be extended using the sophisticated S-Lang macro language.
Website: http://slrn.sourceforge.net/
Some Preparation
slrn is a relatively complex piece of software to install and setup correctly, some preparation work is involved before installing slrn itself:
Set a FQDN
The most correct setup of slrn requires your computer to have a Fully Qualified Domain Name (FQDN). A default Ubuntu setup will often not have this set and the setting in /etc/hosts will look something like this:
127.0.0.1 localhost 127.0.1.1 desktop
This should be altered to reflect your own unique FQDN. For this you have 3 good choices:
- If you own your own Domain Name use this in conjunction with a subdomain and the hostname of your computer.
Use a service such as dyndns.org which will give you a domain name for free.
Use the news service individual.net which will give you a free FQDN.
Once this is in place alter the /etc/hosts file to reflect the FQDN with the following syntax:
127.0.0.1 localhost 127.0.1.1 desktop.your.domain desktop
It is well worthwhile to set your your system correctly in this way and especially worthwhile to ensure that the FQDN is both unique and authentic.
Install msmtp
It is usually not good Usenet etiquette to send an email reply rather than post directly to the newsgroup. On rare occasions however this may be required and for this to succeed a suitable sending agent should be installed. The easiest and most flexible of these is msmtp and it can easily be set to deliver via a Gmail account which I demonstrate below. To install:
sudo apt-get install msmtp ca-certificates
A configuration file is required:
touch $HOME/.msmtprc touch $HOME/.msmtp.log chmod 0600 $HOME/.msmtprc
and the following details will need to be added to this configuration file:
account default host smtp.gmail.com port 587 from full.gmail.address@gmail.com tls on tls_starttls on tls_trust_file /etc/ssl/certs/ca-certificates.crt auth on user gmail.username password mypassword logfile ~/.msmtp.log
Note: You will need to place your own values for from, user and password. Don't feel obligated to use Gmail as msmtp will work with most mail accounts. This completes the set for msmtp and it remains only to add a reference to msmtp in the .slrnrc file which will be explained later in this guide.
Choose an Editor
slrn does not come with an editor so either the system's default editor will be used or an editor must be specified from the slrn configuration file. For the purposes of this page the venerable editor vim will be used:
sudo apt-get install vim
but I would strongly recommend running the command vimtutor after opening vim for the first time to get acquainted with this often quirky editor. Other excellent choices for editor would be jed, nano, pico or even gvim.
Set the NNTP Environment Variable
slrn will need to know where the news server is and the recommended way to do this is to place this address in your .bashrc file:
# Sets the News Server Environment as required by slrn NNTPSERVER='my.news.server' && export NNTPSERVER
Obviously you will need to substitute details of your news server where 'my.news.server' is quoted above.
Completing the setup
There are still a few small steps to follow until slrn is ready to run including installing slrn from the Ubuntu Repository, setting up the ~/.slrnrc file and running some commands to create a newsrc file and download group descriptions. First to install slrn itself:
Install slrn
Ubuntu is fortunate in that for the most part modern versions of slrn are included in the repositories from Intrepid onwards. So all that is required to install slrn is:
sudo apt-get install slrn
(For those who wish to live closer to the cutting edge of slrn development details can be seen below for accessing the slrn subversion repository.) Once this is done the next step is to setup the vital configuration file ~/.slrnrc.
Setup the ~/.slrnrc file
The heart and soul of slrn configuration lies in the file .slrnrc and this must be placed manually. A well commented sample file can be placed from the installed slrn documentation as follows:
zcat /usr/share/doc/slrn/examples/slrn.rc.gz > $HOME/.slrnrc
or a more updated configuration file can be downloaded directly from the slrn website in this manner:
wget http://slrn.sourceforge.net/downloads/slrn.rc -O $HOME/.slrnrc
This file is very well commented and for the most part self-explanatory but there are a few vital areas that I will comment on here. One of the important areas is the early section with user details:
% User details and munged hostname: set realname "Your Real Name" set username "username" set hostname "your.host.name.invalid" % Reply to a different but real email address: set replyto "real.address@gmail.com" % The name of your signature file: set signature ".signature"
It is a wise idea to place .invalid at the end of your 'hostname' unless you wish to receive a barrage of spam from the Usenet spam harvesters. Equally it is a good idea to place a real address in the 'replyto' field. As for the signature unless you wish to feel the wrath of Usenet style-guardians keep it to 4 lines only and make it witty and/or informative, not annoying or offensive.
The 'editor' section is also very important:
% Set your favorite editor: set editor_command "vim '+set tw=72' +%d '%s'"
This section is where you need to place details of the external editor that slrn uses to compose and reply to posts. If you have decided on another editor such as nano, pico, jed or gvim details will need to be altered here.
Some comments about authentication and passwords:
% If a server requires authentication, add an nnrpaccess line for it. nnrpaccess "news.server" "username" "password"
slrn uses this section to place your authentication details with the remote NNTP server. If you do not wish to place your password in a text file in this manner simply omit the password itself, leaving the "", and slrn will prompt you for the details when you log in.
And finally the use of an external transport agent:
% Use msmtp to send email responses: set sendmail_command "/usr/bin/msmtp -t"
Instead of using sendmail to send off email responses this line sends email via msmtp.For the many, many other settings in this file some old fashioned experimentation will help find the optimal settings but for definitive advice the newsgroup news.software.readers is well worth a visit.
Run slrn for the first time
With the laborious setup complete all that remains is to run the following 2 commands:
slrn --create slrn -d
The first reads the active file from the remote NNTP server and creates the default newsrc file for slrn while the second command downloads the group descriptions from the server.
You have now successfully now installed slrn. The program has already subscribed you to a few newsgroups, navigate these by using the arrow keys and enter each group with the space bar. If and when you get stuck in the early stages press the ? key and a list of basic commands will be revealed. Can I suggest a little time on alt.test before venturing on to other groups? And remember that the online home for slrn can be found on news.software.readers. Perhaps I will see you there?
Advanced slrn usage
The directions given above will certainly get slrn running and running well, but there are a few more areas that can be explored and this section aims to speak of some of these areas.
Utilising macros
slrn can be extended by the usage of macros and several of these ship with the Ubuntu installation. One such macro is called 'color.sl'. This macro implements a function called 'edit_colors' that may be used for designing a color scheme interactively. It can be called from the ~/.slrnrc file as follows:
interpret "color.sl" setkey article edit_colors "\eec"
This sets the keys 'ESC e c' to call a macro that will interactively select a color scheme by choosing an object, foreground color and background color. There are several other macros that come with the standard slrn installation, for example one that allows improved searching, another that allows better sorting of the group list, and I encourage you to explore these.
It is also possible to utilise macros that have been authored by enthusiastic slrn users and these can be garnered from newsgroups, personal websites and also from the page of the slrn website exclusively devoted to macros. A very nice example of such a macro is the create_msg_id.sl macro developed by Troy Piggins, it allows for the creation of an unique Message-ID in the following format:
Message-ID: <20080426081643.549@ilium.andrews-corner.org>
This example is drawn from my own setup but it can be seen that the MID is of course yyyymmddhhmmss followed by three random characters and finally subdomain and domain. Providing your FQDN and your computer clock are set correctly it is an unique and easily tracked MID. To utilise this macro yourself create a directory to hold all your macros, change to this appropriate directory and download the macro:
mkdir -pv $HOME/News/macros/ cd $HOME/News/macros wget http://slrn.sourceforge.net/macros/create_msg_id.sl
You will need to alter two variables to show your subdomain and domain and then add the following lines to $HOME/.slrnrc:
set macro_directory "News/macros" interpret "create_msg_id.sl"
And the macro is now installed and ready to use. A similar procedure will launch any macro you chose to use and may even encourage you at some stage to start writing your own.
Installing the svn slrn
Jaunty Jackalope and Karmic Koala feature reasonably modern versions of slrn but for those who have a hunger for the cutting edge it is possible to run the development version of slrn by accessing its subversion repository. Both compiling and subversion tools will be needed as well as the required S-Lang library:
sudo apt-get install build-essential subversion libslang2-dev checkinstall
With these files in place the subversion slrn can be downloaded and compiled as follows:
svn co https://slrn.svn.sourceforge.net/svnroot/slrn/trunk slrn cd slrn ./configure --with-slrnpull make sudo checkinstall --install=yes --fstrans=no
The installation can be subsequently updated by changing to the source code directory, running svn up and recompiling. There is of course absolutely no guarantee that this code will be stable and of course this is half the fun!
External Links
Home of the slrn newsreader This is the main website of the newsreader slrn. It was redesigned and rebuilt for the release of slrn 0.9.9 in 2008.
Documentation for the slrn newsreader All the documentation for the slrn newsreader can be found here including the manual, FAQs, a sample configuration file and much more.
Slrn-user -- discussion about the slrn newsreader The slrn-user mailing list is open for discussion of the use, development and extension of the slrn newsreader.
[Howto] Setup and use Leafnode-2 with the newsreader slrn Get the most out of your copy of slrn by using it in conjunction with the proxy NNTP server Leafnode 2.
slrn patches and ubuntu repository/packages Thomas Wiegner's page of slrn patches and details of his slrn packages and repositories for Feisty, Gutsy, Hardy and Intrepid.