Score:0

How to change default applications: Doc Viewer to Okular

tk flag

I'm on latest 21.10 (Wayland default, Gnome 40.4.0) and have the default "Document Viewer" (Evince?) for viewing pdfs. I'm having trouble with it hanging when I have too many open. So I'd like to change the default pdf viewer to be Okular without having to go to the file manager and choose it in Preferences each time. After lots of searching around, I've got nowhere. How do you actually do this in U21.10 in the year 2021?

Score:1
vg flag

I can't speak for GNOME, but I'm on Xubuntu with Nemo File Manager also called "Nautilus" (sudo apt install nemo) and I can easily change it by going to the PDF -> Right Click -> Properties

PDF -> Right Click -> Properties

Then go to "Open With", select the App you want and click "Set as default" Open With in Properties tab

Hopefully this is not too different on GNOME

Cheers

Update:

This setting is global, i.e. When you click "Set as default" it sets it globally for all pdfs for all apps in the system implementing the XDG protocol

As for your follow up questions:

On Xubuntu I can set Nemo in "Preferred Applications" (app name is exo-preferred-applications). On GNOME it is apparently here

As for where is Nemo setting the PDF stuff, it's in the MIME settings for XDG. There are several GUI MIME editors, my distro already comes with xfce4-mime-settings. Just google "MIME GUI editor linux". This answer has more info about the details of MIME associations.

Basically if the MIME is set up correctly, then the command xdg-open myfile.pdf should open with what you set (e.g. Okular)

147pm avatar
tk flag
Not what I really need. I need the system to know. Telling the file manager for each pdf is what I'm trying to avoid. Thanks anyway.
Matias N Goldberg avatar
vg flag
It *is* what you need. When you click "Set as default" it sets it globally for all pdfs for all apps in the system implementing the XDG protocol
147pm avatar
tk flag
Yes, you're right! I wasn't expecting it to work. Now, where did Nemo make this change? I'd like to change my file manager to Nemo, BTW.
Matias N Goldberg avatar
vg flag
I've updated my answer with more info, hopefully answering what you're looking for
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.