Skip to content

Instantly share code, notes, and snippets.

@ZhiguoLong
Last active January 4, 2017 00:42
Show Gist options
  • Save ZhiguoLong/f4edae46a119e5170119 to your computer and use it in GitHub Desktop.
Save ZhiguoLong/f4edae46a119e5170119 to your computer and use it in GitHub Desktop.
How to set default apps in linux

By editing mimeapps.list

From: http://askubuntu.com/questions/131695/firefoxs-open-folder-opens-gwenview/223646

  1. Edit the ~/.local/share/applications/mimeapps.list
  2. Append either of the following lines (at the [Added Associations] section):
x-directory/normal=kde4-dolphin.desktop;

inode/directory=kde4-dolphin.desktop;
  1. Save and Firefox will use Dolphin from now on.

You do not need both lines. Whichever comes last defines the file browser to be opened.

This configuration file maps a mime-type to a .desktop file, which defines which application ought to open the file. After the mime-type, a semicolon-separated list of possible applications is listed. The left-most application has the highest priority, the rightmost file has the lowest (fallback) priority.

Those *.desktop files are located at /usr/share/applications/. The kde-*.desktop files are located at the subdirectory /usr/share/applications/kde4/. ( /usr/share/applications/kde4/dolphin.desktop , for example )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment