Default applications

From Gentoo Wiki
Jump to:navigation Jump to:search

This article lists methods of setting default applications, particularly in Linux desktop environments that follow standards and specifications. Note, however, that not all software and environments do so.

MIME types describe the kind of content a file contains, such as text/plain, image/gif, and audio/mp3. These types are often used to determine which applications should be used to open particular files.

Setting default applications

Via a file manager

In many cases it suffices to use a desktop's file manager to to set default applications for specific file types (e.g. via a right-click context menu); refer to the specific file manager manual.

Via the desktop environment

Some desktop environments, like GNOME or KDE, allow setting default applications via their configuration systems.

In XFCE, use xfce4-mime-settings from the xfce-base/xfce4-settings package.

Via setting a MIME type's default application directly

Using the xdg-* suite of programs

The xdg-* suite of programs, such as xdg-open(1) and xdg-mime(1), can be used to query and manage the default applications for various MIME types. For details, refer to the XDG/Software page.

Manually editing mimeapps.list files

$XDG_CONFIG_HOME/mimeapps.list (previously, ~/.config/mimeapps.list and $XDG_DATA_HOME/applications/mimeapps.list) is typically used to specify associations between MIME types and applications. The location of mimeapps.list files and their precedence is specified in the "Association between MIME types and applications" standard.

FILE ~/.config/mimeapps.listSet Qutebrowser as the default browser

A particular desktop environment (DE) might also support $XDG_CONFIG_HOME/$desktop-mimeapps.list, to allow associations to be set per-DE.

Via the mailcap(5) file

The mailcap(5) file can be used by email software (and sometimes by other software) to specify associations between MIME types and applications. Refer to the man page for details.

See also