I configured evince to be my default application to open pdf files (using Open with... and clicking on always opening pdf files with this application), but when I type gnome-open foo.pdf
instead of evince, I have Nautilus that opens up in the correct folder highlighting the file of my choice.
This is especially disturbing since I am using the LaTeX plugin for gedit, and when I try and compile a tex file to pdf, instead of opening up a new window with my compiled pdf file, I just have nautilus pop-up. I know I can edit the scripts of my gedit LaTeX plugin to call on evince (or acroread) with the pdf I want opened, but this is a workaround and not the solution I am looking for.
Removing
exo-utils
worked for me perfectly.Forth Approach
I could reproduce your problem by deleting this file
/usr/share/applications/evince.desktop
, so make sure you have this file.Reference.
Third Approach
xdg-open appears to use the configuration of
/etc/mailcap
. So edit it to associate pdf with evince.Look for the lines that begin with
application/pdf
;application/x-pdf
;application/x-bzpdf
;application/x-gzpdf
. They should look like this to associate pdf with evince:Reference.
Second Approach
What is the output of
If the output isn't what we should expect, then:
Reference.
First Approach
There are other places that the file associations are set.
You may change the files associations at:
Look for "pdf" and for "Nautilus" inside theses files.
I just ran into this problem today, and according to this thread on ubuntuforums.org, it's caused by exo-utils:
http://ubuntuforums.org/showthread.php?t=1729680
exo-tools is a dependency of Thunar (which I installed today), but isn't normally installed in stock Ubuntu, which I guess is why they missed this bug in release.
Removing this packaged (I actually just removed Thunar and all it's deps) fixed the problem for me.
The problem is related to
exo-utils
.there is a bug, which has been fixed for Ubuntu Utopic: https://bugs.launchpad.net/bugs/956255
for some reason, the following
x-scheme-handler
lines got copied/sticked in ~/.local/share/applications/mimeapps.listThis caused
xdg-open
/gvfs-open
to use/usr/share/applications/exo-file-manager.desktop
, which contains:This is the reason that even with the fixed package, it still opened Nautilus for every file.
The problem is coming from
thunar
andexo-utils
(which is needed bythunar
). Removing them solves the problem.I had a similar issue, removing exo-utils did not work for me.
After a little digging I found two entries for application/pdf in /etc/mailcap that were prioritizing Xpdf over evince.
After commenting out the two entries for Xpdf, xdg-open correctly opens pdf documents with evince.
I had the same problem after installing nautilus to manage my files under Xubuntu 11.10. When I moved back to plain Ubuntu 12.04 the problem was there too.
Simple solution if this happens ONLY to your user (close to what desgua already said): delete
~/.local/share/application
s directory and everything should go back to normal. You may want to backup some shortcuts inside that directory if you want to preserve them.Working fine for me, gnome-open opens up Adobe Reader properly. Could you try with Adobe reader once.
Might be the case that evince is not properly set as default somewhere.
I am using Natty BTW.