Creative Commons License

This work is licenced under a Creative Commons Licence.

User login

HOWTO: Create a launcher for your remote irssi session running in a screen session

I've recently decided to give irssi a go after all the praise people give it. My previous attempts ended in me being angry with it, but I'm giving it a fair shot this time.

After setting it up how I wanted on my server, in a screen session, I found that I didn't quite like the extra work required to start IRC-ing compared to my previous Xchat. I had to open a terminal, ssh to the remote host, and then reattach to the screen session. I was sure that this could be done all in one go, and I was correct.

The first step is to get automatic login via SSH to the remote server (i.e. so you don't need to enter a password). On your desktop machine (that is, not the remote server with irssi running) do the following:

    cd ~/.ssh
    ssh-keygen -t dsa

Accept the default filenames, and leave the passphrase blank. We then need to copy the public key to the server with irssi running, for example:

    scp [email protected]:~

We then ssh into the remote host, and append the key to our .ssh/authorized_keys (creating if it doesn't exist, and muttering under our breath at the American spelling).

    ssh [email protected]
    [enter password]
    cat >> .ssh/authorized_keys

This should then allow us to login to the remote server without entering a password.

Now, we want to create a launcher that will let us do what we want. In Gnome, right click on an empty area of the panel>add to panel>custom application launcher. Fill in the details as requested, and use the command value shown, editing the appropriate values (this assumes using gnome-terminal):

    gnome-terminal --window-with-profile=irssi --command="ssh -t [email protected] screen -r SCREEN-SESSION-NAME"

You can omit the --window-with-profile option if you like, but I created an irssi profile in gnome-terminal so that the window would have a custom name/icon to distinguish it from other terminal windows when I had many open. The "-t" option is required to set up a virtual-terminal so that you can attach to the screen, omitting it will result in an error.

There you have it, a simple icon launcher. Incidentally, I now find that starting irssi leaves me in a state ready to chat much faster than Xchat ever did!