Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

This question already has an answer here:

I'm using Calibre and it seems that it uses xdg-open to open files. This, even when tried in terminal, only opens nautilus and the file is selected, but not opened. It doesn't matter if I try to open .cbz or .pdf.

This seems fine: /usr/share/applications/defaults.list

application/x-cbr=evince.desktop
application/x-cbz=evince.desktop

Sure when I open the file in Nautilus it opens, but this approach is quite annoying.

share|improve this question

marked as duplicate by Eric Carvalho, Basharat Sialvi, Kevin Bowen, Seth, Radu Rădeanu Jun 28 '13 at 7:37

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
I tried 'xdg-open Horses.pdf' in oneiric and it opens in evince. –  kyleN Nov 11 '11 at 1:07
    
Could you post the file (or a similar file)? What does it look like when it "opens in nautilus" (screenshot)? Are you sure it's not opening in Evince? Please edit your post with the details. –  Jjed Jan 27 '12 at 22:11
    
It doesn't matter what the file is, even .jpg's open nautilus. I'm very sure that it is Nautilus (3.2.1) as it says so in the about-box. Screenshots won't do any good since there really is nothing to see. The terminal command gives no error, but launches Nautilus, with the file selected (as in single-clicked). –  DeusIX Feb 7 '12 at 18:29
    
I started having this problem when I installed xubuntu-desktop alongside gnome. (exo-open works, but xdg-open and gnome-open always open nautilus) –  ithkuil Mar 10 '12 at 18:34

2 Answers 2

up vote 4 down vote accepted

I found a solution to the same problem in an answer for another askubuntu question: http://askubuntu.com/a/39602/1943

Basically you have to set Thunar as default file manager for xfce:

http://ubuntuforums.org/showpost.php?p=10884462&postcount=16

Once you do that, xdg-open and gnome-open will avoid using exo-helper to open nautilus. Somehow gnome and xfce get interwoven.

EDIT: the downside is that now Thunar opens instead of nautilus when opening folders. But I find it less frustrating, on the other hand I could uninstall xfce4 if I really don't want it

share|improve this answer
    
That works, thanks. short form to help others: - open 'exo-preferred-applications' - change the preferred "file manager" under "utilities" to Thunar" –  DeusIX Mar 15 '12 at 13:36
    
This bug persists even in 12.04. Is there a bug filed in Launchpad? –  NoBugs Apr 11 '12 at 22:29

Source: Bug #751374 “Dash won't open files anymore” : Bugs : “unity-place-files” package : Ubuntu

See comment #27 in the source thread. I modified the original commands to use sed.

  1. Remove mime entries containing exo as a normal user.

    sed -i '/exo/d' ~/.local/share/applications/mimeapps.list

  2. Update mime desktop database.

    update-desktop-database ~/.local/share/applications

This helped me fix my own Ubuntu/XFCE install without removing XFCE. You may have to modify more (see source thread), but these commands fixed it in my install.

From what I gather in the source thread, the bug may have been fixed for clean installs.

share|improve this answer
    
@NoBugs See the source thread in my answer for the relevant bug on Launchpad. –  ENG_ACK May 12 '12 at 9:14

Not the answer you're looking for? Browse other questions tagged or ask your own question.