Ubuntu 14.04. Set okular default pdf reader

Edit file mimeapps.list
nano ~/.local/share/applications/mimeapps.list
change the row
application/pdf=kde4-okularApplication_pdf.desktop

kde4-okularApplication_pdf.desktop (the full name of okular)

Edit file defaults.list
sudo nano /etc/gnome/defaults.list

change the rows as follow
application/pdf=kde4-okularApplication_pdf.desktop
application/vnd.adobe.xfdf=kde4-okularApplication_pdf.desktop
application/vnd.fdf=kde4-okularApplication_pdf.desktop
application/vnd.adobe.xdp+xml=kde4-okularApplication_pdf.desktop
application/vnd.adobe.pdx=kde4-okularApplication_pdf.desktop
application/fdf=kde4-okularApplication_pdf.desktop
application/xdp=kde4-okularApplication_pdf.desktop
pplication/xfdf=kde4-okularApplication_pdf.desktop
application/pdx=kde4-okularApplication_pdf.desktop

OR

mimeopen -d *.pdf

kde4-okularApplication_pdf.desktop (the full name of okular)

Tags: