- Notifications
You must be signed in to change notification settings - Fork45
Description
Apologies if this is some basic error or lack of information on my part; I have been reading SO and open desktop specs and have tried many combinations and can't figure out what I'm doing wrong. If I am doing something wrong I've not been able to find documentation to correct me.
qtfm
overwrites my~/.config/mimeapps.list
(or~/.local/share/applications/mimeapps.list
if I use that location).
- Every time I attempted to make a change I made sure
qtfm
was not running while I edited any files - I confirmed that
qtfm
preferences were set to read the rightmimeapps.list
location - I removed all
mimeapps.cache
files that I found - I removed all
defaults.list
files that I could find
And still I got the following behaviour:
- Ensure
~/.config/mimeapps.list
hasmupdf.desktop
as the first entry forapplication/pdf
mimetype - Start
qtfm
and open a PDF file - Master PDF editor is used instead - Exit
qtfm
and findmimeapps.list
has changed to removemupdf.desktop
entry
Expected behaviour:
- Ensure
~/.config/mimeapps.list
hasmupdf.desktop
as the first entry forapplication/pdf
mimetype - Start
qtfm
and open a PDF file - MuPDF application is used - Exit
qtfm
and findmimeapps.list
has not changed
To be clear, the sequence is shown inbash
here:
$ grep mupdf ~/.config/mimeapps.list$ vim ~/.config/mimeapps.list$ grep mupdf ~/.config/mimeapps.listapplication/pdf=mupdf.desktop;masterpdfeditor4.desktop;chromium.desktop;gimp.desktop$ sudo update-desktop-database$ xdg-mime query default application/pdfmupdf.desktop$ qtfm$ grep mupdf ~/.config/mimeapps.list$ xdg-mime query default application/pdfmasterpdfeditor4.desktop
It appears that QtFM overwrites themimeapps
file on start up, but it's not clear where it takes the default file or entries that it uses to overwrite this file. Apologies if I misunderstand basic desktop usage but it was my expectation that applications should not write to this file (unless requested as part of user configuration).
If I try to use QtFM as the means to update my defaults, by usingEdit > Settings > Mime Types, QtFM apparently only draws on that file for candidate applications, and it only does soafter it has over-written the file. It does not refer to/usr/share/applications/
, so the user can only change the order of the applications already in use for that particular mime type (within the over-written file, not as originally found in the file by QtFM on start up). Althoughmupdf.desktop
is available in/usr/share/applications
, sincemupdf.desktop
has been removed by QtFM from themimeapps
file, MuPDF is no longer available for use in QtFM Mime Type settings.
It does appear that QtFM over-writes the configuredmimeapps.list
file on start up. QtFM specifically over-writes the file that it is configured to read, to learn what the user defaults are, as set inEdit > Settings > Mime Types > Default mime applications Configuration file. It's not clear (to me) where QtFM gets it's authoritativemimeapps.list
file from, as I have no othermimeapps.list
ordefaults.list
files (that I can find) on my system.
$ ag -u -g mimeapps /~/.config/mimeapps.list$ ag -u -g defaults.list /
Could you please either clarify what I'm doing wrong here, or else fix QtFM to respect the standard properly?
If I'm doing something wrong, could you please clarify the correct usage in theman
page or as appropriate?
Thanks