<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="../assets/xml/rss.xsl" media="all"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Stefano Rivera (Posts about jabber)</title><link>https://stefanorivera.com/</link><description></description><atom:link href="https://stefanorivera.com/categories/jabber.xml" rel="self" type="application/rss+xml"></atom:link><language>en</language><copyright>Contents © 2025 &lt;a href="mailto:stefano@rivera.za.net"&gt;Stefano Rivera&lt;/a&gt; 
&lt;a rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/"&gt;
&lt;img alt="Creative Commons License BY-SA"
     class="cc-license-button"
     src="/assets/img/cc-by-sa-4.0.svg"&gt;&lt;/a&gt;</copyright><lastBuildDate>Mon, 10 Nov 2025 10:14:01 GMT</lastBuildDate><generator>Nikola (getnikola.com)</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>Irssi libnotify integration</title><link>https://stefanorivera.com/posts/2008/02/25/irssi-libnotify-integration/</link><dc:creator>Stefano Rivera</dc:creator><description>&lt;p&gt;I came across irssi-libnotify integration in &lt;a href="http://www.siltala.net/wp-content/uploads/2008/02/oskar-080218.png"&gt;a picture&lt;/a&gt; in blog post I read this morning.&lt;/p&gt;
&lt;p&gt;I thought about this, and decided that this was something I had to have. I often don't pay attention to my IRC while I'm busy with something else, and miss out on a conversation that I'm being hailed in. (By something else, I'm meaning non-important, non-masked-interrupts-something-else.)&lt;/p&gt;
&lt;p&gt;It isn't an easy problem to solve, though. Irssi is running on a remote machine inside screen. I'll be accessing it from one of many machines, possibly NATed, and possibly unable to receive incoming TCP connections.&lt;/p&gt;
&lt;p&gt;I googled around a bit, and came across 3 main classes of solution to this problem:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Run libnotify directly on the irssi-box, and use ssh's X-forwarding to display it on my client. This is sub-optimal, because your X server isn't always available. Example: &lt;a href="https://github.com/stickster/irssi-libnotify"&gt;irssi-libnotify&lt;/a&gt; (which requires the module to be reloaded every time you re-attach screen)&lt;/li&gt;
&lt;li&gt;Output all hilighted messages to a log file (using fnotfiy), and tail that log file with a second ssh session into a local script that calls libnotify. Sub-optimal, because it requires manually running a second ssh session, and restarting it in the event of network issues. &lt;a href="https://pthree.org/2007/03/21/irssi-gui-notify/"&gt;Example&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Send notify events down the Print Channel of the terminal. This will pass through screen, and pop out at your terminal-emulator. xterm and rxvt are both capable of then sending them to an arbitrary command (which could call libnotify). This is quite a clever hack, except that gnome-terminal doesn't support it. &lt;a href="http://jaredquinn.info/it-related/technical/unix/2007.09.25/libnotify-with-irssi-over-ssh/"&gt;Example&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;As you can see, they all have major short-comings, and I wasn't about to implement any of them.&lt;/p&gt;
&lt;p&gt;Finally, I realized that Jabber would be a good way to hail me. My laptop / desktop / n800 / foo all run jabber clients. Perfect. I googled, and found a few pre-canned solutions. I settled for &lt;a href="http://da.weeno.net/code/irssi/jabber_hilight_notify/"&gt;jabber-hilight-notify&lt;/a&gt;. It runs a jabber client in a perl irssi script. This then sends me a message whenever a hilighted line crops up. (Assuming I'm not in "Do Not Distrub" mode)&lt;/p&gt;
&lt;p&gt;I initially had some problems with getting jabber-hilight-notify working. It turns out that setting a custom resource string is a bad idea. My final config was:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code literal-block"&gt;&lt;span class="n"&gt;jabber_hilight_notify_target&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;stefano&lt;/span&gt;&lt;span class="nv"&gt;@rivera&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;za&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;net&lt;/span&gt;
&lt;span class="n"&gt;jabber_password&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;xxxxxxxx&lt;/span&gt;
&lt;span class="n"&gt;jabber_id&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;irssi&lt;/span&gt;&lt;span class="nv"&gt;@rivera&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;za&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;net&lt;/span&gt;
&lt;span class="n"&gt;jabber_server_reconnect_time&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;60&lt;/span&gt;
&lt;span class="n"&gt;jabber_hilight_notify_target_presence&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;online&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;chat&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;away&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;xa&lt;/span&gt;
&lt;span class="n"&gt;jabber_hilight_notify_when_away&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;OFF&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;My Pidgin provides the libnotify integration, although jabber-hilight-notify's designed to work with &lt;a href="http://da.weeno.net/code/tavu/"&gt;Tavu&lt;/a&gt; (a desktop-notification frontend for KDE). I think a better approach would be to use Telepathy. If such a general telepathy-based solution could be found, then it would be easy to have multiple remote daemons send notifications to you via jabber transport.&lt;/p&gt;
&lt;p&gt;Now to see if I'm still happy with it after a week of it interrupting me.&lt;/p&gt;</description><category>irc</category><category>irssi</category><category>jabber</category><category>libnotify</category><category>technical</category><category>xmpp</category><guid>http://tumbleweed.org.za/2008/02/24/irssi-libnotify-integration</guid><pubDate>Sun, 24 Feb 2008 22:20:24 GMT</pubDate></item></channel></rss>