Friday, March 21, 2008

xdg-open and general freedesktop annoyance

Using the E17 RSS reader has recently acquainted me with xdg-open from, or as it is more affectionately known, "the utility that causes all URLs to be opened in the most sucky browser installed, e.g. konqeror or nautilus".

Fortunately, you can add the lines

BROWSER=`which firefox`
export BROWSER

into ~/.profile, or into ~/.bashrc and do the old bash-profile-symlink-hack:

ln -s ~/.bashrc ~/.bash_profile

...and a reasonably well-written XSession file (e.g. the one that ships with *buntu)
will find it.

But come on, an ENVIRONMENT VARIABLE? For a helper program called by X applications?
You have to restart X if you want to change it!

What is so horrible about an optional freedesktop config file, say in ~/.local/etc/defaults/browser, that lets you change this at runtime?

Or, if having to read a file every time a link is checked is the problem (I can see that), why not have a freedesktop config service that caches settings and can be flushed by the user?

There is an upside to all of this: having spent the past evening restarting either E17 or X to tweak parts of the system, I am coming to like the idea of using XSM to restore all of my terminal, IDE, and browser sessions. If it plays well with E17's virtual desktops.

1 comment:

  1. Hi, I found a fix for this under debian/ubuntu

    sudo update-alternatives --config x-www-browser