Promote evince in /etc/mailcap.order
GIMP very unexpectedly took over opening PDF files a while ago when issuing the see
command. It is listed in /etc/mailcap
before the more appropriate evince. Of course I can edit this file by hand, but since it is managed by the system, the next update-mime
run will overwrite these changes.
There is a file called /etc/mailcap.order
that promises to help to achieve exactly what I want. I added and entry there:
evince:application/pdf
However, the next update-mime
run answers with:
Warning: package evince listed in /etc/mailcap.order does \
not have mailcap entries.
Changing the package name to evince-common
or changing the media type to */*
did not achieve anything. So what is the right format?
Solution 1:
Just following @Jos suggestion, I fixed this annoying issue with:
echo 'application/pdf; evince %s; test=test -n "$DISPLAY"' | sudo tee /usr/lib/mime/packages/evince
echo 'evince:application/pdf'| sudo tee -a /etc/mailcap.order
sudo update-mime
Solution 2:
You can add the line between the "User Section Begins" and "User Section Ends" lines in /etc/mailcap. These lines should not be overwritten by update-mime
.
However, at least if you are managing more computers through some deployment system, the solution by fuujuhi may be better.