Set standard file browser for "open containing folder"

15,098

Solution 1

You can define the default file browser by editing the file ~/.local/share/applications/mimeapps.list. Open this file and change the line inode/directory as follow

inode/directory=nautilus.desktop;

If this doesn't work, you should change the filemanager in the file

/usr/share/applications/mimeinfo.cache

by adding (or updating) this line

inode/directory=nautilus.desktop

Solution 2

The following command solved this problem in arch linux:

xdg-mime default nautilus.desktop inode/directory

(Source: Arch Forums)

Solution 3

You can find a comprehensive description of setting up default applications here in the according Arch wiki article.

For your specific case, you edit ~/.config/mimeapps.list and add a new line with inode/directory=nautilus.desktop to the section [Default Applications].

The file should look similar to the following one:

[Default Applications]
text/plain=SciTE.desktop 
text/x-tex=texmaker.desktop 
inode/directory=nautilus.desktop

Solution 4

Use env XDG_UTILS_DEBUG_LEVEL=10 xdg-mime query default inode/directory to get the full list of queried files. You'll get an output like this:

Checking ~/.config/mimeapps.list
Checking ~/.local/share/applications/gnome-defaults.list and ~/.local/share/applications/gnome-mimeinfo.cache
Checking ~/.local/share/applications/defaults.list and ~/.local/applications/mimeinfo.cache
nautilus.desktop

Check each of these files.

Share:
15,098

Related videos on Youtube

rockZ
Author by

rockZ

Updated on September 18, 2022

Comments

  • rockZ
    rockZ almost 2 years

    Since I installed EasyTag on my Arch Linux several other programs use EasyTag instead of Nautilus as filebrowser.

    For example, Firefox starts EasyTag if I click on "open containing folder".

    Where can I set Nautilus as my "standard file browser"?

  • rockZ
    rockZ over 7 years
    Yeah looks like easytag corrupted the inode/diectoryline in mimeinfo.cache: inode/directory=easytag.desktop;org.gnome.Nautilus.desktop; Was able to fix it, thx!
  • Admin
    Admin over 7 years
    It depends on factors that I cannot state, but in some cases the file manager only needs to be present (mentioned) after inode/directory=, even on the last position, no matter if others are also listed there and in what order. In case it doesn't work, one should try to put it there first, while keeping others. If this still doesn't work, it may be necessary to remove at least the culprit that takes over if not all other programs mentioned there except the file manager.
  • Admin
    Admin over 7 years
    @iBlink - multiple programs listed there shouldn't be a problem, but sometimes is. Have you tried by just putting nautilus first? -- Keeping other programs there (like easytag or media players) may be useful as it adds them to the 'open with' context menu as an option for folders
  • rockZ
    rockZ over 7 years
    @cipricus Ah multiple lines are for the open as context menu? Nice to knew since easytag somehow overwrites my changes all the time. I just add another line with inode/directory. Thanks
  • Admin
    Admin over 7 years
    How to avoid the problem entirely: unix.stackexchange.com/q/336982/32012
  • Admin
    Admin over 7 years
    @iBlink - I have found new info on this problem. See my link above.
  • Marcus
    Marcus about 7 years
    ~/.local/share/applications/mimeapps.list is deprecated and not used by Firefox. You should edit ~/.config/mimeapps.list. For more hierarchy information it's best to refer directly to here wiki.archlinux.org/index.php/Default_applications
  • l.g.karolos
    l.g.karolos almost 7 years
    That worked form me I could't find the folder in the accepted answer
  • Marcus
    Marcus almost 7 years
    The file ~/.local/share/applications/mimeapps.list` is deprecated (I posted a comment about that to the accepted answer).
  • SergioAraujo
    SergioAraujo over 5 years
    In my case the cache was the problem so I edited the file /usr/share/applications/mimeinfo.cache "with sudo"