Image of the glider from the Game of Life by John Conway
Skip to content

Irssi GUI Notify- The Bash Script

Apparently, people are having issues with the Bash script in my previous post. There is a syntax error, and they can't get it working. The error is something along these lines:

aaron@poseidon:~$ bash 3: Syntax error: "done" unexpected (expecting "do")

The problem is a missing semi-colon after the word "message" just before the word "do". So, it should read something like this:

...while read heading message;  do  /usr/bin/notify-send...

I have an updated copy. You can grab it here. Just replace 'user@server' with whatever is appropriate for you.

Because the Bash script is the most hackish of this notification solution, here is what I recommend doing with it:

  • Obviously, save it in a location where you won't delete it later.
  • Pull up a terminal and run screen. If you don't have screen installed, 'sudo aptitude install screen'.
  • Run the bash script 'bash'
  • Detach the screen session by pressing 'ctrl-a ctrl-d' in that order.
  • Exit the terminal you just pulled up

The script is now running in the background. When you change locations, you'll need to stop the bash script before you leave your current location. So:

  • Pull up a terminal and reattach your screen session: 'screen -dr'
  • Cancel the script with 'ctrl-c'. It should still be running.
  • Exit your terminal

Again, not the most elegant, but it works, and works well. Of course, if you have any questions, feel free to email me, comment on either post, or visit me in #ubuntu-us.

{ 8 } Comments

  1. Rick | March 22, 2007 at 8:13 am | Permalink

    I ended up adding a shebang to the file and putting it in my .irssi (I keep it in svn for config and such) directory for safe keeping. Then I just added the script to my gnome session so it autostarts when I log in.

    The only issue was that since I use a passphrase and ssh-askpass I had to add a sleep 180 to the script before it tries to ssh into the box running irssi. It gives me a couple of minutes to get logged in.

    Thanks for the notes though. This is very cool and I love that I don't actually have to have a screen session to my irssi box to get a notification that someone wants my attention.

  2. Aaron | March 22, 2007 at 9:32 am | Permalink

    Rick- No problem. Glad you like it. It's cool stuff.

  3. Donn | March 22, 2007 at 9:48 am | Permalink

    Totally wild suggestion - why all the stuff with screen? Why not run it with a & at the end?


  4. Aaron | March 22, 2007 at 9:59 am | Permalink

    Donn- It's not that wild of a suggestion. The reason for screen, is because it's beautiful. The power of screen is just amazing. The & is just as good of a solution, I just prefer screen. That's all. πŸ™‚

  5. Donn | March 22, 2007 at 10:17 am | Permalink

    Oh okay - s'cool. I have yet to meet screen, but I have heard good things πŸ˜‰

  6. Ian McEwen | October 16, 2007 at 5:09 pm | Permalink

    Interesting addition to the script was posted on the blog you link --- an updated version of the script someone made (including URL highlighting and an image) can be found at

    Be warned, however, that it references an image (~/.local/share/icons/ksirc.png) that you'll probably want to change to something else.

  7. yedek parca | September 23, 2008 at 7:20 am | Permalink

    Thank you , No problem. Glad you like it. It’s cool stuff.

  8. Olli Savolainen | February 8, 2009 at 6:40 am | Permalink

    The solution seems to strangely slow down the functioning of irssi, is it filling up the net connection's bandwidth or what, but the keyboard seems to just get stuck while writing in the remote irssi now.

    Every three to five seconds irssi is not receiving any characters and they do not go to the buffer either, so if I wrote anything during the pause I have to write it again.

    Otherwise works beautifully, but this renders it unusable...

{ 2 } Trackbacks

  1. nixternal » Notify Works in Kubuntu | March 22, 2007 at 10:25 am | Permalink

    [...] response to Aaron’s blog posts (Part 1, Part 2) about IRSSI and libnotify to send you a notification upon highlight, well it works great in [...]

  2. [...] response to Aaron’s blog posts (Part 1, Part 2) about IRSSI and libnotify to send you a notification upon highlight, well it works great in [...]

Post a Comment

Your email is never published nor shared.