Default applications: Difference between revisions
WhyNotHugo (talk | contribs) (formatting) |
Prabuanand (talk | contribs) m (removed inappropriate categories) |
||
Line 27: | Line 27: | ||
[[Category:Desktop]] | [[Category:Desktop]] | ||
Revision as of 08:50, 26 April 2025
To change the default application associated with a filetype you must use the xdg-mime command and point to the desired desktop file.
For programs that do not ship a desktop entry file, one must be created.
Example
The following example makes mupdf the default command to open pdf files.
Create a desktop file, because mupdf doesn't provide one:
Contents of ~/.local/share/applications/mupdf.desktop
[Desktop Entry]
Type=Application
Terminal=false
Exec=/usr/bin/mupdf-gl
Name=mupdf
Use xdg-mime
from xdg-utils to associate the desktop file with the pdf extension:
$ xdg-mime default mupdf.desktop application/pdf