Tag/tag.png

Needs Expansion
This article is incomplete, and needs to be expanded. More info...

Irssi is an Internet Relay Chat (IRC) client. It is a text-based client as it lacks a graphical user interface (gui) such as XChat, Chatzilla and others. It was written from scratch using the C programming language, and was designed to run on Unix-like operating systems. It has been ported to the Windows platform using Cygwin, and for the Macintosh under the name MacIrssi.

Some of the features include:

  • Auto logging
  • Formats and themes
  • Configurable key bindings
  • Paste detection
  • Perl scripting
  • Irssi-proxy
  • Transparent upgrading
  • Recode support

Irssi is Free Software licensed under the GNU Public License.

Installing Irssi

Irssi is located in the Ubuntu "main" repository and can be installed via the terminal through the command sudo aptitude install irssi. If you have access to an SSH server where you can install and run Irssi, it is also recommended to install screen, a terminal multiplexer. Another recommended package to install is irssi-scripts, found in the Ubuntu "universe" repository. Thus, the command for installing this collection of software would be typed in the terminal as so:

sudo apt-get install irssi irssi-scripts screen openssh-server

Using Irssi

Once installed, running Irssi is simple through typing the command irssi in a terminal. This will bring you to the default client waiting for a command. Because Irssi is a text-based client, there are no menus to navigate the system. Thus, all commands in Irssi start with the forward-slash "/". If ever in question about a command or how to use it, Irssi has great built-in documentation through the /help command. There is also great documentation on the Irssi website.

Irssi can handle multiple connections to several different servers at once. As such, it is possible to be active in several channels on different networks at the same time. For example, to connect to the IRC server freenode, type the command:

/connect irc.freenode.net

If you also wanted to connect to the EFNet network, then you would also issue the command:

/connect irc.efnet.net

You would now be connected to two servers at the same time. The server that you are connected to is identified in the status bar at the bottom. To switch between servers, as also identified in the status bar, type the keyboard shortcut ctrl+x.

At this point, you should be familiar with two other commands: /server and /disconnect. /server has the same syntax as /connect, except it tells Irssi to keep a connection to only one server. So, if you wanted to connect to Undernet, while also connected to Freenode and EFNet, and you typed /server irc.undernet.org, you would disconnect from Freenode and EFNet, and only be connected to Undernet. The other command /disconnect will disconnect you only from the server that has "focus" or that is identified by the client.

Once connected to a certain server, you will probably want to join some channels and start chatting. Joining a channel is easy by issuing the command /join. You can list one channel, or multiple channels under the same /join command. For example, if I wanted to join the #ubuntu, #ubuntuforums and #ubuntu+1 channels, I would type (making sure that I am focused on the Freenode network if connected to multiple servers):

/join #ubuntu,#ubuntuforums,#ubuntu+1

You would now have 3 windows open, with #ubuntu in window 2, #ubuntuforums in window 3, and #ubuntu+1 in window 4 (Window 1 is reserved for the status window).

Irssi provides a number of ways to navigate the windows that are open. First is the /window command. Issuing that command followed by a window number will take you to that window (/window 3 will take you to the 3rd window). Also, by default, Irssi has a couple keyboard shortcuts to navigate the first 10 windows. You can either you the shortcut ESC # to goto a window, or alt+#, where "#" would be the number of the window you wish to navigate to.

Irssi with screen

Screen is a powerful terminal multiplexer that allows you to run terminal applications and have local and remote access to the application. When using Irssi with screen, you never have to worry about disconnecting from IRC or running 2 or more clients, just because you are leaving your desk and going to another location. Screen makes it possible to keep 1 connection open, and have access to that session, regardless of your physical location (so long as it is running on an SSH server and you have an Internet connection).

To start a screen session, assuming it's installed, pull up a terminal and type screen. This will first show you a brief message about screen, its version information and licensing. Press the space bar or enter, and you will be taken to a familiar looking terminal. At this point, launch Irssi as you normally would through the irssi command.

Let's now look at the following scenario. Suppose you have an SSH server at home that you can access remotely. You have Irssi and screen installed. You pull up your terminal and issue the command screen irssi, connect to your favorite servers and channels, and begin chatting away. A few hours later, it's time to go to work. You leave you desk, and go to your place of employment. From work, you pull up a terminal, and SSH into the same server that you are running Irssi on at home. But, when you SSH in, you are staring at a blank terminal. How do you get you Irssi session attached to the terminal that you are now using at work?

Easy. Screen has the ability to "detach" and "reattach" sessions regardless of location. To detach a screen session from its previous terminal, you would issue the command screen -d. To attach the session to your new terminal, you would then type screen -r. This would forward your current screen session to terminal that you are currently sitting at. The two commands can be combined in one using the command screen -d -r or screen -dr.

So, in our scenario above, now that we are at work, staring at a blank terminal, we would just type screen -dr, and our Irssi session that we launched earlier at home has be attached to our current location, and we can continue chatting like we never left our desk.

Screen is a wonderful utility, however, very complex. The above example is sufficient for running Irssi, but there are many commands and features that make screen a powerful utility. For example, screen has the ability to split screens, making it possible to have a terminal in one split screen, and a text editor such as vim in the other. Screen supports entering Unicode characters through keyboard digraphs. Screen can also be used similar to tabbed browsing where multiple screen sessions exist in one physical terminal.

Enhancing Irssi

Irssi has the ability to load configurable themes and scripts making the client meet your personal needs. When Irssi is installed, a ~/.irssi/ directory is created. This directory is the home of the configuration file for Irssi, any themes that you want to use and other data. To use a theme, drop the theme in the ~/.irssi/ directory, and in the Irssi client itself, type /set theme madcow if madcow is the theme that you downloaded and want to use.

Irssi functionality can also be extended through Perl scripts. As you may have noticed, there is no nicklist in Irssi. There is a nicklist.pl script available here that makes this possible. There are plenty of other scripts that can really enhance the Irssi experience. To take advantage of these scripts, create a scripts directory in ~/.irssi/ and drop your scrips in there. If you would like these scripts to run automatically when Irssi is launched, create an autorun directory in your ~/.irssi/scripts/ directory, and create symbolic links in the autorun directory to the scripts in the scripts directory.

External Links

Irssi (last edited 2016-05-07 22:45:35 by paulw2u)