Arch Linux: xdg-utils 1.0.2.20091216-1 xdg-settings get default-browser xdg-settings: unknown desktop environment That's all I get, and no way to specify the default browser. It ignored $BROWSER. I tested with sage: http://www.sagemath.org/ In the end I had to hack the fallback in xdg-open to include my browser. IMHO xdg-settings should work properly without DE, since it appears to be the only way to specify defaults for people without DE. DEs include their own tools anyway.
What desktop environment / window manager are you running? The question is, if you're not using GNOME/KDE/XFCE, how should xdg-settings get/set the default browser? Maybe the answer depends on how xdg-open decides to handle http://url. With the upstream version, it tries mime-open, run-mailcap, and $BROWSER. (Debian? / Ubuntu patched their copy to behave differently) This would mean xdg-settings have to know how to interact with mime-open, run-mailcap, and be able to set $BROWSER if needed. I guess I can take this bug, though it'll be a low priority item. If you really want this fixed, patches are welcome. :)
I'm currently running awesome, which is just a WM. I'm on Arch Linux, a distro that doesn't patch when not absolutely necessary, so I get upstream code. In my case xdg-open always used its fallback, which is three hardcoded browser names, and those didn't correspond to any browser installed. My current workaround is to edit /usr/bin/xdg-open and change the fallback to the browser I want to use, but why this is no solution should be obvious. I'm not familiar with how mime-open or run-mailcap works, but if xdg-open would use $BROWSER it would be a start (it was ignored last I tried, but $BROWSER wasn't set in the login shell, so maybe this was part of the problem). When I ignore mime-open and run-mailcap there are two possible solutions I can think of, one would be to set $BROWSER and to make sure that xdg-open cares about that, but I guess this would have drawbacks inherent to env variables. The other idea is to add the possibility to set the xdg-open fallback using xdg-settings, or something similar. This would need a config file somewhere I guess. I actually was looking for such a config for a while until I found out that those browsers are simply 'hardcoded' (from a user pov) in xdg-open. Thanks for taking care of that. It happens often enough that the desktop world doesn't even recognize that something besides the DEs and desktops even exists.
I aggree with the original poster that this is not intuitive, nor does it provide a good solution for non-DE users. I have encountered the same problem while using compiz as a standalone WM. If I type 'xdg-open --list' I see 'default-web-browser' as a known property, but i can't get/set its value, which is confusing. Couldn't there be a simple configuration file where default applications could be specified?
I run openbox (on Fedora 17 if that matters) and I can't seem to use xdg-settings unless I specify DE: $ xdg-settings set default-web-browser chromium-browser.desktop xdg-settings: unknown desktop environment It seemed to work when I did this: $ DE=gnome xdg-settings set default-web-browser chromium-browser.desktop
xdg-open also tries to use a program registered for the mime type x-scheme-handler/http when given an url. So I managed to change the default browser with: $ xdg-mime default firefox.desktop x-scheme-handler/http Perhaps xdg-settings could fallback to this setting, when no DE is found. (Probably should also set it for https)
This bug was fixed in 1.1.0.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.