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.
mimeo -dto list available desktop entries
mimeo --add application/pdf org.gnome.Evince.desktopto set the default application
mimeo /tmp/test.pdfto ensure the document is opened in Evince.