Improving applications' desktop integration
Application which do not "belong" to any of the free desktop projects, i.e. which do not use their respective development platform, are usually lacking integration features.
However, most of have options to configure helper applications for certain tasks, e.g. handling HTTP URLs, opening files of certain MIME types, etc.
Common use cases of this are:
- setting a mail client to handle mailto links in Firefox
- setting a browser to handle http and https links in Thunderbird
- setting a browser and mail client for Google Earth
- setting a mail client for OpenOffice.org
There are quite some documents available on the Internet how to do this, usually taking one handler application as an example.
Since any change to your desktop configuration implies that you also have to change all this separate configurations, you might have been looking for a better way to do this and, fortunately, there is!
Using the Portland initiative's xdg-utils adapter scripts, you can now change your desktop's configuration and all those third party applications will follow those changes automatically!
- Setting a mail client to handle mailto links in Firefox
Type about:config into the browser's URL input field and then type mailto into the filter input field of the configuration browser.
If there is an entry called network.protocol-handler.app.mailto right-click it and choose Modify
If there is no such entry yet, right-click anywhere on the list and choose New, then String and then type network.protocol-handler.app.mailto.
In both cases, i.e. either after choosing Modify or after entering the new key, type xdg-email and click on OK
- Setting a browser to handle http and https links in Thunderbird
Since Thunderbird is also a product of the Mozilla Foundation, the steps are pretty similar. Instead of typing about:config as in the Firefox setup, you can navigate to the configuration browser through the menus. Menu Edit, then Preferences and then on the Advanced tab click on Config Editor...
The entries you want to create or modify here are network.protocol-handler.app.http and network.protocol-handler.app.https, their value in both cases should be set to xdg-open
- Setting a browser and mail client for Google Earth
Google Earth is a bit more complex, since it does not (yet) allow to treat http and mailto differently.
A quick solution is to set $BROWSER to xdg-open before launching the program, e.g. by editing the googleearth start script and putting the following line after the export for LD_LIBRARY_PATH:
export BROWSER=xdg-open
A better, yet more complex, solution, would be to set the variable to point to a script which delegates mailto URIs to xdg-email and everything else to xdg-open, but the simple solution should work well enough.
- Setting a mail client for OpenOffice.org
Theoretically, OpenOffice.org offers a configuration option for an email client in its settings dialog. Menu Tools, then Options.... Expand the category Internet and click on E-mail
However, changing this to xdg-email does not work, or at least it fails on my system :( I tried with and without full path to the xdg-email executable, but OOo seems to be expecting something else.
Searching through the file belonging to the OOo package, I found a script called open-url. Maybe it can be modified to delegate to the xdg-utils adapters.
If anyone gets this to work, please let me know!