View previous topic :: View next topic |
Author |
Message |
potuz Guru
Joined: 30 Jan 2010 Posts: 378
|
Posted: Wed Sep 06, 2017 12:17 am Post subject: [SOLVED] xdg-open does not honor default |
|
|
I am very puzzled by this, how do I get to have qpdfview as the default application for application/pdf?
Code: |
$ xdg-mime query default application/pdf
/usr/share/applications/qpdfview.desktop
$ xdg-open paper.pdf
Opening "paper.pdf" with Okular (application/pdf)
|
Last edited by potuz on Thu Sep 07, 2017 6:20 pm; edited 1 time in total |
|
Back to top |
|
|
charles17 Advocate
Joined: 02 Mar 2008 Posts: 3664
|
Posted: Wed Sep 06, 2017 6:20 am Post subject: |
|
|
Be sure the filetype / mimetype is the same: xdg-mime query filetype paper.pdf |
|
Back to top |
|
|
potuz Guru
Joined: 30 Jan 2010 Posts: 378
|
Posted: Wed Sep 06, 2017 9:21 pm Post subject: |
|
|
charles17 wrote: | Be sure the filetype / mimetype is the same: xdg-mime query filetype paper.pdf |
Yes as indicated in my post |
|
Back to top |
|
|
potuz Guru
Joined: 30 Jan 2010 Posts: 378
|
Posted: Thu Sep 07, 2017 6:20 pm Post subject: |
|
|
Ok, so I didn't know this, but setting the default without the absolute path solved the issue:
Code: |
$ xdg-mime query default application/pdf
qpdfview.desktop
$ locate qpdfview.desktop
/usr/share/applications/qpdfview.desktop
|
|
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21431
|
Posted: Fri Sep 08, 2017 1:48 am Post subject: |
|
|
If you set the path to any non-existing string, does that also cause the use of Okular? If so, I suspect the problem is that the tool assumed specific directories to search and pasted the full path given into those directories, causing it to fail to find e.g. /usr/share/applications//usr/share/applications/qpdfview.desktop, and then give up and use Okular as a default. If so, I would consider this a bug in the tool that you used to set the absolute path, as it should have warned you not to set a path which could not later be resolved. |
|
Back to top |
|
|
|