I am both a student and a huge fan of the Internet Relay Chat (IRC) program irssi. This brief guide aims to give just a starting point for any like me who are keen to explore this amazing program. I shall do this by demonstrating how to install irssi and some scripts, connect to Freenode with SSL and then access the #ubuntu channel. The guide has most recently been tested with irssi 0.8.15 and Natty Narwhal but should work, perhaps with some small modifications, for most Ubuntu releases.
Getting started ...
One important point in this guide is that where you are required to fill in your own details for such things as passwords, email addresses etc I will mark the area this way: <password>. Change this for your own details and omit the brackets in all cases. First let us download some required files from the repository using the following single command:
This will only be a small download, now start the program as follows:
sudo apt-get -y install irssi irssi-scripts ca-certificates \
libcrypt-blowfish-perl libcrypt-dh-perl libcrypt-openssl-bignum-perl \
You should then see the following screen:
Well that never makes a great first impression does it? Never fear we are now going to make things a little friendlier:
10:24 -!- Irssi: Looks like this is the first time you've run irssi.
10:24 -!- Irssi: This is just a reminder that you really should go read
10:24 -!- Irssi: startup-HOWTO if you haven't already. You can find it
10:24 -!- Irssi: and more irssi beginner info at http://www.irssi.org
10:24 -!- Irssi:
10:24 -!- Irssi: For the truly impatient people who don't like any automatic
10:24 -!- Irssi: window creation or closing, just type: /MANUAL-WINDOWS
10:24 -!- Irssi:
10:24 -!- Irssi: For Ubuntu specific help type "/connect irc.ubuntu.com"
10:24 -!- Irssi: and "/join #ubuntu" (without the quotes) and ask your
10:24 -!- Irssi: question.
Connecting to Freenode and #ubuntu ...
No doubt like most people (including me) you will ignore the polite note in this opening window encouraging you to first read some of the irssi documentation. At some stage I would suggest that this would be an excellent idea and perhaps sooner rather than later. So to start we need to set a nick, usually a pithy and fairly cool one, and your real name, don't forget to use your own details for <nick> and <Real Name>:
Then manually connect to Freenode as follows:
/set nick <nick>
/set real_name <Real Name>
This connects and then to manually join #ubuntu simply run the following:
/connect irc.freenode.net 8001
And there you are in the thick of it, a very busy channel and a little chaotic too. For the moment we will leave this channel:
This closes the active channel but leaves us still connected to Freenode so we can complete the setup.
/leave Put your witty parting shot here!!
Register with Freenode ...
It is a very good idea to formally register your nick with Freenode and it is easy enough to do. Don't forget to substitute your own details here:
NickServ will send an email to your email address with copy and paste instructions to verify you nick details. So your email address is not obvious to all users (although this setting is usually the default) then issue the following command:
/msg nickserv REGISTER <password> <email>
It is not mandatory but often a good idea to create an alternate nick and then group this with your account. So while logged on with your primary nick run the following:
/msg NickServ SET HIDEMAIL ON
Finally check your setup with the following command:
/msg nickserv group
And that is the basics of our dealings with Freenode registration, although I would suggest that after 4 weeks you go to #freenode and ask for an unaffiliated cloak to shield your IP details from the curious. But now to automate the irssi connection and both connect with SSL and secure your password exchange with SASL.
Automatically connect with SSL/SASL ...
For the most secure connection it is best to connect with SSL and then shield the password verification with SASL. First to setup the Freenode sasl perl script with the following single command:
Now load the script manually and add in the required settings:
mkdir -pv $HOME/.irssi/scripts/autorun && cd $HOME/.irssi/scripts && \
wget http://freenode.net/sasl/cap_sasl.pl && \
cd autorun && ln -sv ../cap_sasl.pl
Finally set irssi to automatically make an SSL connection to Freenode on startup and then automatically log on to #ubuntu:
/script load cap_sasl.pl
/sasl set Freenode <primary-nick> <password> DH-BLOWFISH
Perhaps you should also cross your fingers when you restart irssi? If all is well you will see +Zi in the bar at the base of the irssi window and in the irssi connection dialogue you should also see something like the following:
/network add Freenode
/server add -auto -ssl -ssl_verify -ssl_capath /etc/ssl/certs -network Freenode irc.freenode.net 7000
/channel add -auto #ubuntu Freenode
If all is not well retrace your steps and see if you can spot a problem. If however all is well close your chat windows with /leave, close irssi using the /exit command and continue on as we add a few scripts to make life a little more pleasant with this great irc application.
10:51 -!- Irssi: SASL authentication successful
Add a few more scripts ...
I will now demonstrate how to automatically load scripts both from the Ubuntu script pack as well as from external sources. Two great scripts are 'scriptassist.pl', which enables easy installation and upgrade of scripts, and 'mouse.pl' which allows some use of mouse in irssi. These are part of the Ubuntu script pack and can be automatically loaded using the following single command:
The syntax for scriptassist can be seen by typing in '/scriptassist help' in the opening irssi window. Plenty more scripts to explore in this script pack! I demonstrate also how to download a couple of external scripts. 'adv_windowlist.pl' allows easier navigation of multiple channel windows while 'hack-whois-in-current-window.pl' shows the '/whois' window in the current window. The following is a single command:
cd $HOME/.irssi/scripts/autorun && \
ln -sv /usr/share/irssi/scripts/scriptassist.pl && \
ln -sv /usr/share/irssi/scripts/mouse.pl
Details of well-written scripts can be seen by opening them with your favourite text editor and following the instructions printed within. Plenty of scripts to explore and perhaps you might even consider writing a few yourself?
cd $HOME/.irssi/scripts && \
wget http://anti.teamidiot.de/static/nei/*/Code/Irssi/adv_windowlist.pl && \
wget http://dgl.cx/irssi/hack-whois-in-current-window.pl && \
cd autorun && \
ln -sv ../adv_windowlist.pl && \
ln -sv ../hack-whois-in-current-window.pl
And in conclusion ...
Experienced users of irssi and IRC know that I have omitted many, many areas that enhance the experience of using this great program. However hopefully I have furnished a strong starting point for inexperienced users who will subsequently explore the program a little more fully. Please feel free to ask questions in this thread if there are problems or suggestions for improvement with this guide. And remember "Have Fun!!".
March 18, 2011