Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] xdg-open does not honor default
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
potuz
Guru
Guru


Joined: 30 Jan 2010
Posts: 378

PostPosted: Wed Sep 06, 2017 12:17 am    Post subject: [SOLVED] xdg-open does not honor default Reply with quote

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
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3664

PostPosted: Wed Sep 06, 2017 6:20 am    Post subject: Reply with quote

Be sure the filetype / mimetype is the same: xdg-mime query filetype paper.pdf
Back to top
View user's profile Send private message
potuz
Guru
Guru


Joined: 30 Jan 2010
Posts: 378

PostPosted: Wed Sep 06, 2017 9:21 pm    Post subject: Reply with quote

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
View user's profile Send private message
potuz
Guru
Guru


Joined: 30 Jan 2010
Posts: 378

PostPosted: Thu Sep 07, 2017 6:20 pm    Post subject: Reply with quote

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
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21431

PostPosted: Fri Sep 08, 2017 1:48 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum