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 irssi_notify.sh irssi_notify.sh: 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 irssi_notify.sh’
- 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.