Fix PDF opened in GIMP by default
When Arch linux is used without a specific desktop environment like GNOME or
KDE, opening a file by xdg-open works incorrectly. Particularly, GIMP is
launched for PDF instead of a dedicated viewer. There are some details on the
Arch wiki page
xdg-utils. To fix the
issue, it’s necessary to install another application association handler.
Looking at the comparison table on the page Default
applications,
I decided to install
mimeo and
xdg-utils-mimeo.
Then to make sure Evince is launched to view a PDF file, did the following:
mimeo -dto list available desktop entriesmimeo --add application/pdf org.gnome.Evince.desktopto set the default applicationmimeo /tmp/test.pdfto ensure the document is opened in Evince.