Change default applications used by gnome-open, exo-open, xdg-open, gvfs-open and kde-open
11,691
Solution 1
It's all done with MIME types in various databases. xdg-mime
can be used to query and set user values.
Solution 2
I had the same problem today, but more towards the gnome/cinnamon side of things.
You can query and change the default mime type like this:
gvfs-mime --query inode/directory
gvfs-mime --set inode/directory nemo.desktop
Solution 3
Building on @Ignacio Vazquez-Abrams answer, here are the incantations for the impatient that should cover many typical use cases:
Figure out the mime type of your file:
xdg-mime query filetype somefile.pdf
will result in application/pdf
.
Set a default application to handle it:
xdg-mime default qpdfview.desktop application/pdf
where I use qdfview's desktop definition as the program to handle PDFs.
Related videos on Youtube
Author by
student
Updated on September 18, 2022Comments
-
student over 1 year
How to change the applications associated with certain file-types for
gnome-open
,exo-open
,xdg-open
,gvfs-open
andkde-open
?- Is there a way by editing config files or by a command-line command?
- Is there a way to do this using a GUI?
For both questions: How to do it per user basis, how to do it system-wide?
-
Ciro Santilli Путлер Капут 六四事 about 9 yearsFor kde-open and other KDE apps: askubuntu.com/questions/165618/…