3

When I attach an external HDD, GNOME suggests opening it with Anjuta:

Gnome notification for inserting new HDD

How can I make it open with Nautilus instead?

derobert
  • 107,579
  • 20
  • 231
  • 279
Mikhail Krutov
  • 1,014
  • 2
  • 11
  • 22

1 Answers1

5

Most likely it has to do with this commit:

Open a directory with Anjuta

where they changed:

 [File Loader]
-SupportedMimeTypes=application/x-anjuta-old
+SupportedMimeTypes=application/x-anjuta-old,inode/directory

so when installing anjuta, update-desktop-database is run (during post-install); that updates /usr/share/applications/mimeinfo.cache and the default handler for inode/directory becomes anjuta.
To fix this run:

xdg-mime default org.gnome.Nautilus.desktop inode/directory

or manually edit ~/.local/share/applications/mimeapps.list and add inode/directory=org.gnome.Nautilus.desktop under [Default Applications] e.g:

[Default Applications]
inode/directory=org.gnome.Nautilus.desktop

or if you already have an entry for inode/directory, make sure org.gnome.Nautilus.desktop is the first in the list.


The command (that you had tried)

xdg-mime default nautilus.desktop inode/directory

no longer works with newer versions of gnome/nautilus because the (gnome) apps are launched using D-BUS activation. As a result, nautilus.desktop no longer exists - it has been replaced by org.gnome.Nautilus.desktop


If editing mimeapps.list has no effect that means your DE isn't freedesktop.org compliant so maybe it's time to file a bug report.

don_crissti
  • 79,330
  • 30
  • 216
  • 245
  • You might be able to check which way works (or how new your gnome is), by having a look in `ls /usr/share/applications | grep nautilus` – PythoNic Jun 28 '16 at 19:47
  • in some cases (like in my Manjaro), where there is no `mimeapps.list` in `usr/share/applications`, creating one in `~/.local/share/applications` as you indicate will not fix it, but a `~/.local/share/applications/mimeinfo.cache` will do the trick, with that `inode/directory` line under `[MIME Cache]`, as indicated [here](http://unix.stackexchange.com/a/336984/32012), following your comment thereunder. –  Jan 13 '17 at 10:44