How to set default opening folder for Nautilus file manager

There are several answers given to this question at AskUbuntu.com. What worked for me was the simplest of them, and what I did was one step simpler than what was given. So here's what works for me using PopOs 20 (which is just Ubuntu 20 with some elegant UI, drivers, and useability improvements). The other answers to this question give insight on what's happening and why, but this answer worked great:

  1. Copy the global launcher to the local location:
cp /usr/share/applications/org.gnome.Nautilus.desktop /home/<YOURUSERNAME>/.local/share/applications/
  1. Make the copy executable:
chmod +x /home/<YOURUSERNAME>/.local/share/applications/org.gnome.Nautilus.desktop
  1. Edit the copy. The last line (following "New Window") starts with Exec=. Change it to:
Exec=nautilus --new-window /your/desired/directory

Then comment the DBusActivatable line:

#DBusActivatable=true
  1. Log out of the session and log back in.

This now opens my desired directory both when called via the dash and when clicked in the dock.


Thanks to Levente for providing this answer, which I'm posting on my own blog so it's easy to find in the future when I need it again.

Add a comment

HTML code is displayed as text and web addresses are automatically converted.

Page top