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?

  • From google, I've tried to $xdg-mime default nautilus.desktop inode/directory But this changed nothing. – Mikhail Krutov Apr 18 '15 at 12:12
  • Why is it a problem that Gnome suggests to use Ajunta? – Gilles 'SO- stop being evil' Apr 18 '15 at 21:35
  • @don_crissti please post that as an answer. – derobert Apr 18 '15 at 22:47
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.

|improve this answer|||||
  • 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, following your comment thereunder. – user32012 Jan 13 '17 at 10:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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