Difference between revisions of "Default applications"

From ArchWiki
Jump to: navigation, search
(Created the page with some initial info)
 
Line 8: Line 8:
 
==Changing a default application ==
 
==Changing a default application ==
 
===General===
 
===General===
There is a file {{~/.local/share/applications/defaults.list}} that seems to have something to do with default applications.
+
There is a file {{filename|~/.local/share/applications/defaults.list}} that seems to have something to do with default applications.
 
===Gnome 3===
 
===Gnome 3===
 
====General====
 
====General====
Sometimes, a certain application will not appear in the right-click ``Open With...'' dialog. To fix this problem, locate the {{filename|.desktop}} file in {{filename|/usr/share/applications}}, edit it as root, and add {{Commandline|%U}} to the end of the {{Commandline|Exec=}} line. For example, Kile currently has this problem; you need to edit {{filename|/usr/share/applications/kde4/kile.desktop}} and change the line reading {{Commandline|Exec=kile}} to read {{Commandline|Exec=kile %U}}. Also, please file a bug against the upstream project if you notice this problem.
+
Sometimes, a certain application will not appear in the right-click ''Open With...'' dialog. To fix this problem, locate the {{filename|.desktop}} file in {{filename|/usr/share/applications}}, edit it as root, and add {{Commandline|%U}} to the end of the {{Commandline|Exec=}} line. For example, Kile currently has this problem; you need to edit {{filename|/usr/share/applications/kde4/kile.desktop}} and change the line reading {{Commandline|Exec=kile}} to read {{Commandline|Exec=kile %U}}. Also, please file a bug against the upstream project if you notice this problem.
  
 
As far as I can tell, on Gnome 3, there are two configuration systems, GConf (older) and dconf (newer). GConf can be configured with {{Commandline|gconf-editor}}; in particular, you can try messing with the {{filename|/desktop/gnome/applications/}} key, but changing settings there didn't fix any problems I had.
 
As far as I can tell, on Gnome 3, there are two configuration systems, GConf (older) and dconf (newer). GConf can be configured with {{Commandline|gconf-editor}}; in particular, you can try messing with the {{filename|/desktop/gnome/applications/}} key, but changing settings there didn't fix any problems I had.
 
====Terminal====
 
====Terminal====
To configure the default terminal for the package ``nautilus-open-terminal'' to Konsole, use
+
To configure the default terminal for the package ''nautilus-open-terminal'' to Konsole, use
 
  $ gsettings set org.gnome.desktop.default-applications.terminal exec konsole
 
  $ gsettings set org.gnome.desktop.default-applications.terminal exec konsole
 
  $ gsettings set org.gnome.desktop.default-applications.terminal exec-arg "'-e'"
 
  $ gsettings set org.gnome.desktop.default-applications.terminal exec-arg "'-e'"
Line 21: Line 21:
 
  $ konsole -e cd "~/Desktop"
 
  $ konsole -e cd "~/Desktop"
 
====Web browser====
 
====Web browser====
To configure the web browser used by the AUR package ``gnome-gmail-notifier'', run
+
To configure the web browser used by the AUR package ''gnome-gmail-notifier'', run
 
  $ gconf-editor
 
  $ gconf-editor
 
and edit the {{filename|/desktop/gnome/url-handlers/http/}} key. You may want to change {{filename|https/}}, {{filename|about/}}, and {{filename|unknown}} keys while you're at it.
 
and edit the {{filename|/desktop/gnome/url-handlers/http/}} key. You may want to change {{filename|https/}}, {{filename|about/}}, and {{filename|unknown}} keys while you're at it.

Revision as of 23:51, 11 June 2011

Tango-document-new.pngThis article is a stub.Tango-document-new.png

Notes: please use the first argument of the template to provide more detailed indications. (Discuss in Talk:Default applications#)

There are numerous places to configure default applications on Linux. This page will attempt to address problems related to the following issues:

  • You need to change a certain default application (e.g. after switching desktop environments), but there appears to be nowhere to configure it, or an application ignores your configuration
  • You regularly switch back and forth between several desktop environments, and need to configure some applications (e.g. file manager) on a per-desktop-environment basis, but need to configure others (e.g. web browser) globally

Until there is more information/organization, it will just be a dumping ground of random tricks

Changing a default application

General

There is a file Template:Filename that seems to have something to do with default applications.

Gnome 3

General

Sometimes, a certain application will not appear in the right-click Open With... dialog. To fix this problem, locate the Template:Filename file in Template:Filename, edit it as root, and add Template:Commandline to the end of the Template:Commandline line. For example, Kile currently has this problem; you need to edit Template:Filename and change the line reading Template:Commandline to read Template:Commandline. Also, please file a bug against the upstream project if you notice this problem.

As far as I can tell, on Gnome 3, there are two configuration systems, GConf (older) and dconf (newer). GConf can be configured with Template:Commandline; in particular, you can try messing with the Template:Filename key, but changing settings there didn't fix any problems I had.

Terminal

To configure the default terminal for the package nautilus-open-terminal to Konsole, use

$ gsettings set org.gnome.desktop.default-applications.terminal exec konsole
$ gsettings set org.gnome.desktop.default-applications.terminal exec-arg "'-e'"

The second command tells Template:Commandline to expect a command to be passed to it as part of the invocation. ``nautilus-open-terminal needs this because it passes a Template:Commandline command in order to switch to the appropriate directory. For example, opening a terminal in your Template:Filename directory will invoke something like

$ konsole -e cd "~/Desktop"

Web browser

To configure the web browser used by the AUR package gnome-gmail-notifier, run

$ gconf-editor

and edit the Template:Filename key. You may want to change Template:Filename, Template:Filename, and Template:Filename keys while you're at it.

File manager

XChat is using Thunar instead of Nautilus for some reason. More info once I get this figured out...

Maintaining settings for multiple desktop environments

More info later...