irssi, screen, and growl… Nerdy goodness.

At $dayjob, we use IRC a lot. Most everyone runs irssi in screen, so they can re-attach whenever and whereever and not miss out on important info. Today I thought to myself “Surely SOMEONE is doing irssi in screen and wants growl notifications”. As ridiculous as it sounds, someone was. I took their approach, briefly outlined below, and customized it a little to make me happy. For this to work, you need Growl and GrowlNotify installed on the Mac. Jabba, if you read this, I didn’t figure you’d mind the rewrite here :)

  1. On both: Cut a hole in the box. By this I mean “Set up ssh keys to access the box.” If you aren’t running with passwordless ssh keys, make sure you are using something like “ssh-agent bash” as your default terminal window
  2. On remote: Download Justins script from http://justindow.com/Download/fnotify.zip . Install it in ~/.irssi/scripts/ , then symlink it into ~/.irssi/scripts/autorun/ :
    mkdir -p ~/.irssi/scripts/autorun && cd ~/.irssi/scripts/ && wget http://justindow.com/Download/fnotify.zip && unzip fnotify.zip && ln -s fnotify.pl autorun/
    If you don’t want to quit irssi for this procedure, do this:
    /script load fnotify.pl
  3. On local(Mac): Make a local script named “irc_growl.sh” in ~/bin/ . Put this in it and chmod 755that bad boy:
    #!/bin/sh
    # $argv = %r %h

    # Kill all current fnotify sessions
    ps | awk '{if($0 ~ /fnotify/ && $1 ~ /[0-9]+/ && $4 !~ /awk/) print $1}' |
    while read id; do
    kill $id
    done

    # SSH to host, clear file and listen for notifications
    (ssh -q $1@$2 -o PermitLocalCommand=no "> .irssi/fnotify; tail -f .irssi/fnotify" |
    while read heading message; do
    growlnotify -t "${heading}" -m "${message}";
    done)&

  4. On local put something like this in ~/.ssh/config:
    Host remotehost
    Hostname remotehost.example.com
    PermitLocalCommand yes
    LocalCommand ~/bin/growl_irc.sh %r %h

Next time you ssh to the box, this second ssh session will start silently in the background, reading the ~/.irssi/fnotify file and outputting new lines to Growl.  Pretty cool!

April 17, 2012 • Posted in: FOSS, How-To, Linux, OSX, Technology

3 Responses to “irssi, screen, and growl… Nerdy goodness.”

  1. Robbieindup - June 22nd, 2020

    Новые свинг истории – Домашние интим истории, Реальные ххх рассказы

  2. weedbroma - January 20th, 2021

    IMVU How To Get Free VCoin

    As you see for the right desktop computer for your needs, pay close attention to your intended type of Internet link as skillfully as whether or not a potential desktop model has a modem.

    Have you ever seen a celebrity on television and thought, “I would love to have what he or she is wearing”? If so, after that you are in luck. It’s pretty easy to have fashion that matches the fashion of your favorite celebrities. Here are some fashion tips that can urge on you achieve a Hollywood look.

    When choosing accessories, stick to one large, announcement piece. Dangling earrings, a huge necklace, and a chunky bracelet meet the expense of the eyes nowhere to rest. If you want the focus to be upon your necklace, wear studs in your ears. If you don eye-catching earrings, skip the necklace the whole to avoid looking too “busy.”

    If you want to create yourself look thinner, try to wear the color black. Whether it is a black shirt, skirt, dress or suit, the color tends to make the total body appear to be thinner. If black is not a color you are fond of, attempt to accessorize your help bearing in mind brighter colors.

    For a easy habit to look more stylish, interchange out your cheap rubber flip-flops for a pair of strappy sandals in leather, patent, or option eye-catching, grown-up material. Your feet will nevertheless be comfortable, but you will instantly look more put-together and polished. look for embellished styles similar to beads, embroidery or funky hardware.

    KW:
    IMVU VCoin Generator No Offers 2021
    Free IMVU VCoin Without Paying
    IMVU Free VCoin No Surveys 2021
    IMVU Free VCoin

  3. Bathroomsbal - May 8th, 2021

    https://notifybrass6.bladejournal.com/post/2021/04/27/Everything-You-Have-Always-Wanted-To-Know-About-Football

    $sob

Leave a Reply