In Windows 10, user may right-click on the ‘File Explorer’ icon on panel to access pinned folders (e.g., Desktop, Downloads and Documents) quickly.
Ubuntu has first implemented this feature in Ubuntu 21.10, though it seems to be not working properly due to bug. Ubuntu 20.04 may manually add the context (right-click) menu options so user can right-click on the ‘Files’ icon to choose open favorite folders quickly.
Step 1: Copy File Manager .desktop file to local folder:
The file manager’s shortcut icon is handled by the relative
.desktop file located in “/usr/local/applications” directory. It’s recommended to copy the file to local user directory, so the changes will function for current user only.
1. Press Ctrl+Alt+T on keyboard to open terminal. When it opens, copy the file to local directory via command:
sudo cp /usr/share/applications/org.gnome.Nautilus.desktop ~/.local/share/applications/
2. The file pasted into local directory is still owned by root. You may change the ownership by running command:
sudo chown $USER:$USER ~/.local/share/applications/org.gnome.Nautilus.desktop
$USER returns your current username.
Step 2: Edit the .desktop file and add more actions:
Now edit the .desktop file by running command in terminal:
This command will open the file in Gedit text editor. When it opens, do following steps one by one:
1.) First, comment the “DBusActivatable=true” line by adding ‘#‘ at the beginning to disable it. Or, the ‘Exec’ value will be overrided.
2.) Add more values to “Actions“, such as downloads, documents, videos and whatever as you prefer. And, separate them via ‘;‘ without blank space.
Accordingly, add the “[Desktop Action downloads]”, “[Desktop Action documents]”, “[Desktop Action videos]” segments in the bottom. And, each segment has:
- “Name” to display in the right click menu.
- “Exec” command to open the desired folder, usually
Step 3: Restart Gnome Shell to apply change:
After saving the file, restart Gnome Shell. In Ubuntu 20.04 default Xorg session, simply press Ctrl+Alt+F2, then try r in pop-up dialog and hit Enter.
The ‘Files‘ icon in left dock panel should now take use of the
.desktop file in user directory and provide the quick access folders you set via right-click menu.
That’s all. Enjoy!
Hello, i have an a question, how can i do is i want more than one of thise Custom Folder on my Faborites Bar?
Because i followed your instructions, but when i made another custom folder dose’nt worck, if this not possible, i want to know how can i add an a separator line between folders for order the list as i want?
By the way, excellent post, well, without further ado, for the moment I am awaiting your response, thanks.