You are not logged in.

#1 2018-10-08 18:11:20

asportking
Member
Registered: 2014-04-17
Posts: 41

Can't stop xdg-open from using Mendeley for PDFs

I installed Mendeley a while back, but later uninstalled it. However, xdg-open is still trying to use it to open PDFs:

[asportking@arch ~]$ xdg-mime query default application/pdf
mendeleydesktop.desktop

Changing the default application via

xdg-mime default evince.desktop application/pdf

does not affect this. I've tried this with and without sudo - I think something might have happened by running it with sudo, because

[asportking@arch ~]$ sudo xdg-mime query default application/pdf
org.gnome.Evince.desktop

, but I hadn't thought to check the output of the above command before fiddling with all of this, so it could be the case that the sudo option was never touched by Mendeley in the first place. How can I make it so that my pdfs are opened by evince?

Offline

#2 2018-10-08 18:24:10

headkase
Member
Registered: 2011-12-06
Posts: 1,977

Re: Can't stop xdg-open from using Mendeley for PDFs

You shouldn't use sudo, that sets the association for a super user.

Go to: "~/.config" and edit the association directly in the "mimeapps.list" file.  Open that with any text editor and find the type then set it to what you want.

This will set the default for your user, it's in your user's .config settings.

Edit: Also look for duplicate entries - that might be at the root of your issue or not.

Last edited by headkase (2018-10-08 18:25:40)

Offline

#3 2018-10-08 18:25:32

asportking
Member
Registered: 2014-04-17
Posts: 41

Re: Can't stop xdg-open from using Mendeley for PDFs

headkase wrote:

You shouldn't use sudo, that sets the association for a super user.

Go to: "~/.config" and edit the association directly in the "mimeapps.list" file.  Open that with any text editor and find the type then set it to what you want.

This will set the default for your user, it's in your user's .config settings.

[asportking@arch ~]$ cat .config/mimeapps.list 

[Default Applications]
application/pdf=evince.desktop

It looks like it's set in the file, but Mendeley is still being used somehow.

Offline

#4 2018-10-08 18:26:04

headkase
Member
Registered: 2011-12-06
Posts: 1,977

Re: Can't stop xdg-open from using Mendeley for PDFs

See my edit: are there any duplicates for the type?

Edit: and it shouldn't just be evince for the desktop file.  GNOME puts like org.gnome.evince or something similar to that.

Last edited by headkase (2018-10-08 18:27:33)

Offline

#5 2018-10-08 18:50:34

asportking
Member
Registered: 2014-04-17
Posts: 41

Re: Can't stop xdg-open from using Mendeley for PDFs

Got it - it looks like there was an additional file under ~/.local/share/applications/ that was overriding the options I was setting.

Offline

#6 2018-10-09 15:55:47

headkase
Member
Registered: 2011-12-06
Posts: 1,977

Re: Can't stop xdg-open from using Mendeley for PDFs

asportking wrote:

Got it - it looks like there was an additional file under ~/.local/share/applications/ that was overriding the options I was setting.

Excellent.  Good job.  If your thread is now solved then edit your first post and in the title add "[Solved]" to it.

Offline

Board footer

Powered by FluxBB