Difference between revisions of "Xdg-open"
m |
|||
Line 1: | Line 1: | ||
+ | [[Category:Desktop environments (English)]] | ||
+ | [[Category:Software (English)]] | ||
+ | {{i18n|xdg-open}} | ||
+ | |||
xdg-open is a desktop-independent tool for configuring the default applications of a user. Many applications invoke the {{Codeline|xdg-open}} command internally. | xdg-open is a desktop-independent tool for configuring the default applications of a user. Many applications invoke the {{Codeline|xdg-open}} command internally. | ||
Revision as of 11:53, 8 January 2012
xdg-open is a desktop-independent tool for configuring the default applications of a user. Many applications invoke the Template:Codeline command internally.
You can bind mimetypes to .desktop files in Template:Filename with the xdg-mime command:
# This will make Thunar the default file-browser, i.e. the default application for opening folders. xdg-mime default Thunar.desktop inode/directory
The best way to look up the MIME type is to read the Template:Codeline list in your application's Template:Filename file. You can put custom Template:Filename files into Template:Filename.
The config file
Template:Codeline saves the configuration for Template:Codeline in Template:Filename. Its format is as follows:
[Default Applications] mimetype=desktopfile1;desktopfile2...
For example,
[Default Applications] text/html=firefox.desktop inode/directory=kde4-dolphin.desktop;Thunar.desktop;nautilus.desktop
It seems that it is perfectly save to edit that file.
Environment Variables
export BROWSER=chromium # this will make xdg-open use chromium for any kind of URLs
export DE="xfce" # This will make xdg-open use the more user-friendly exo-open, because it assumes it is inside Xfce. Use exo-preferred-applications for configuring.