IRC client on Raspberry Pi – Screen and irssi

A IRC client lets you connect to a IRC server enabling you to join chatrooms on that server. IRC servers do not by default store logs while you are not logged in. This can be annoying if you wish to keep informed of whats going in on the chatroom.

One solution to this is to never log out of the chat room. However this relies on constant access to the internet. Since I have a laptop this isnt feasible.

irssi and screen to the rescue

The solution for me was to install irssi on my raspberry pi and use that. irssi is a command line IRC client which means i can access it over SSH. This also means I can run it all the time on my raspberry pi and connect to it from wherever I am.

However, when you exit a ssh session it normally kills all the processes you are running, which means that irssi would stop.

To solve this, you can use a program called screen. This starts a new “screen” which can be detached and it will continue running even if you exit the ssh connection. This means you can run irssi all the time even when you are not connected.

On a raspberry pi (or any Debian type system) screen and irssi can be installed with the following command

sudo apt-get install screen irssi

Screen is relatively easy to use, to launch an instance you run “screen”. When you run screen you send commands to it by using ctrl-a and then pressing a third key. You can use screen like any terminal.

To disconnect from screen and keep it running in the background press ctrl-a d. To resume this you can type screen -r  then press tab to get a list of all current screen sessions. Typing in the correct one will let you resume. Here screen will be used to keep irssi open when I disconnect from SSH.

When both have been installed you can run screen and then irssi from inside your new screen instance. Once irssi has been launched you can use it to  join your IRC server.  For full details of how to use irssi view the irssi website.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.