I have just started using Okular and I love it. It has a lot of functionality that I need when I am in pdfs and it already opens up epubs automatically. How to I get it to open pdfs by default instead of "Document Viewer?"
I appreciate the help!
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.Sign up to join this community
According to here, Right click the file of the format you want, select
Go to the
open with tab, select the program you want to be the default for that type of file, then press the button
Set as Default:
Well, none of the other answers worked on 14.04, Okular simply doesn't show up in the list. But this worked perfectly:
mimeopen -d myfile.pdf
It will give you a list of applications that can open the file, and will also update the default application for you.
$ mimeopen -d myfile.pdf Please choose a default application for files of type application/pdf 1) Print Preview (evince-previewer) 2) Xournal (xournal) 3) MuPDF (mupdf) 4) Adobe Reader 9 (AdobeReader) 5) GIMP Image Editor (gimp) 6) Document Viewer (evince) 7) Other... use application
Selecting one of these will set it as the default for
application/pdf file types. You can easily set any executable to be the default by using the
use application #7 use command: okular Opening "myfile.pdf" with usr (application/pdf)
okular doesn't work, you might want to try entering the full path (
usr/bin/okular). You can find out where Okular is located by running
In Ubuntu 14.04, the file you need to edit is :~/.local/share/applications/mimeapps.list
The name of okular may varies. Someone may also find that there is no "Set as default" button.
So follow these steps:
Step 1: Right click on any pdf file => Open with => find Okular
The name of okular applications now should be specified in mimeapps.list. Now move to step 2.
Step 2: gedit ~/.local/share/applications/mimeapps.list Step 3: Find okular in [Added association] and copy to [Default application] section. In my case, it is 'application/pdf=kde4-okularApplication_pdf.desktop;'
And you are done.
Use file manager (Dolphin in my case), select a file of the .pdf format, right click and select Properties (or Alt-Return), then click on the "File Type Options" and put your favorite viewer on top of the list (you may need to add one), and if it doesn't help, remove the one that is currently offered in the application (e.g. "Document Viewer") from which you want to open your file in Okular (Firefox in my case), even if it is not the first one on the list. Worked on 20.04.5 LTS with KDE.