Default applications: Difference between revisions
WhyNotHugo (talk | contribs) m (→Example: Linkify mupdf) |
WhyNotHugo (talk | contribs) (→Example: formatting, links) |
||
Line 16: | Line 16: | ||
}} | }} | ||
Use <code>xdg-mime</code> from {{Pkg|xdg-utils}} to associate the desktop file with the pdf extension: | |||
{{Cmd|$ xdg-mime default mupdf.desktop application/pdf}} | {{Cmd|$ xdg-mime default mupdf.desktop application/pdf}} | ||
== See also == | == See also == |
Revision as of 12:57, 14 February 2025
To change the default application associated with a filetype you must use the xdg-mime command and point to the desired desktop file (if it doesn't exist, you must create one).
Example
In the following example we want to make mupdf the default command to open pdf files.
First you need to 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