ralphm.net

ralphm's blog

Wednesday, 5 January 2005

XMPP URIs

XMPP everywhere!

Contrary to what offline offlinestpeter thinks, it is possible to hook up external handlers in Firefox/Mozilla/Galeon/... for arbitrary URI schemes, including the xmpp URI scheme.

For Firefox and Mozilla, you simply have to add two keys to mozilla's configuration. This can be done via prefs.js or via the about:config page inside your browser. To hook up a handler for the xmpp URI scheme, you need a boolean key network.protocol-handler.external.xmpp set to true, and a string key network.protocol-handler.app.xmpp that points to the program that should handle the URI. The whole URI will be given to that program as its first argument. It might be that you have to restart your browser, but after that, links like xmpp:ralphm@ik.nu should fire up the external program.

For GNOME apps like Galeon, you need to add a few keys to the gconf registry using gconftool-2:

  • /desktop/gnome/url-handlers/xmpp/command of type string that points to the command. For example xmpp.sh "%s", where %s will be substituted with the actual URI.

  • /desktop/gnome/url-handlers/xmpp/enabled of type boolean, set to true

  • /desktop/gnome/url-handlers/xmpp/needs_terminal of type boolean, set to false