Sample Header Ad - 728x90

xdg-open opens a different application to the one specified by xdg-mime query

13 votes
2 answers
4380 views
I run Debian Jessie without a desktop environment (I use the tiling window manager i3) and like to use xdg-open to quickly open files using a preferred application. I have an ongoing problem setting the preferred app for PDF files though. This is my problem in a nutshell: $ xdg-mime query filetype ~/Downloads/document.pdf application/pdf $ xdg-mime query default application/pdf /usr/share/applications/qpdfview.desktop $ xdg-open ~/Downloads/document.pdf [opens gimp!] Any ideas would be hugely appreciated - this has been plaguing me for about a year. The only way I've ever managed to (temporarily) fix it is by directly editing the mimeinfo.cache and removing the reference to gimp from the application/pdf record. And yes, /usr/share/applications/qpdfview.desktop exists and contains the correct location of the qpdfview binary. (Indeed, this .desktop file is used when I hand-edit mimeinfo.cache.)
Asked by Tim (233 rep)
Jun 3, 2014, 10:46 PM
Last activity: Aug 5, 2024, 09:55 AM