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