I want like above screenshot for quick access to my file/folder.
- 1,187
- 11
- 43
- 81
-
2One way could be creating a custom `.desktop` file for nautilus. – Videonauth Dec 10 '17 at 12:18
-
I don't understand. You want to pin folder `Downloads` (and then others, I guess)... but you are posting an image where you already have it. What do you want, different from what you have? It would help-others-help-you posting how you got to the point you are, and what is missing. Also, why the answers (at least the most upvoted) do not satisfy your requirement. There is no feedback from you in any of the answers, so it is hard to tell how to improve on them. – sancho.s ReinstateMonicaCellio Jul 15 '21 at 10:23
-
@sancho.sReinstateMonicaCellio i want exactly as shown in the picture.. none of the answer below fulfills it.. above is just some editing i did in pinta. – nazar2sfive Jul 15 '21 at 14:11
-
@nazar2sfive are you using default ubuntu dock or any other? – PRATAP Jul 16 '21 at 08:25
7 Answers
Follow the steps below.
Create a
.desktopfile (saycustom-filemanager.desktop) in~/.local/share/applications. You can do this by running the following command in Terminaltouch ~/.local/share/applications/custom-filemanager.desktopOpen the
.desktopfile using a text-editor, for example by runninggedit ~/.local/share/applications/custom-filemanager.desktopAdd the following lines to the file:
[Desktop Entry] Name=File Manager Comment=Access and organize files Keywords=folder;manager;explore;disk;filesystem; Exec=nautilus --new-window %U Icon=org.gnome.Nautilus Terminal=false Type=Application Categories=GNOME;GTK;Utility;Core;FileManager; Actions=new-window;open-downloads; [Desktop Action new-window] Name=New Window Exec=nautilus --new-window [Desktop Action open-downloads] Name=Open my Downloads folder Exec=nautilus /home/YOUR-USER-NAME/DownloadsReplace
YOUR-USER-NAMEby your user-name in the last line.Save the file.
Click on "Activities" and search for "File Manager". It should appear.
Right click on the "File Manager" and select "Add to Favourites". It should be added to the dock.
Now if you right click on the newly added File Manager icon in the dock, you should see a "Open my Downloads folder" option which should work as expected.
Similarly you can add shortcuts to other locations by adding new Desktop Actions and adding the name of the action to the Actions= line. For more info see this.
- 67,112
- 21
- 233
- 243
-
1Hi there, Using Ubuntu 18.04 here. Your advice almost worked as expected. But by following your instructions I got two issues: 1. There are, now, two nautilus icons on applications overview; 2. When the new nautilus icon is pinned in the dock and I choose, for example, "open my download folders", the default nautilus icon appear in the dock with the Download folder (when the Download folder is supposed to open in the new created icon itself). As a result I end up with two nautilus icons in the dock as well. Do you know how to fix these? – Alex Góes Fuhrmann Feb 14 '19 at 22:50
-
@alex The first one is kinda intended, to distinguish from the system one. You can hide the system one by adding a `NoDisplay=true` line to the associated `.desktop` launcher. For the second part you need to add a correct `StartupWMClass` entry to the `.desktop` file: https://askubuntu.com/q/975178/480481 If it still doesn't work, then there might be a bug with Ubuntu dock, you may have to report at launchpad.net. – pomsky Feb 14 '19 at 23:55
-
After some attemps I figured out how to make it work properly. Thank you for the tips, I'll post a new answer in this topic explaning how to make it work in Ubuntu 18.04 for users who may need it. – Alex Góes Fuhrmann Feb 16 '19 at 14:27
-
@AlexGóesFuhrmann it would be good to put a link to your answer here so we can directly go there – Nagabhushan S N Aug 01 '20 at 06:55
As we can pin only Application to Gnome Dock, the best available option here is creating an application launcher that will open the favorite directory directly with a single mouse click.
So in order to do that navigate to activities and search for "Main menu".
Now you will get a window titled Main menu.
Click on New item. and You will get a small window and fill the fields like described below.
In the given example I am pinning my
Videosdirectory to Dock.And now it will be shown at the bottom of the main menu window like this
Click on close button and again go to activities and search for the the "Name" provided. In my case its "My Videos". Single click on that and just drag and drop it to the
Gnome dock.Now You will get the shortcut on your Dock.
If you click on that you will get your favorite directory which you set opened by nautilus.
Tweaks
You can do more tweaks like changing the icon of the application launcher you want while creating the shortcut of even after creating the shortcut and pinning it.
After tweaking my shortcut (My Videos) is like this.
- 14,308
- 4
- 74
- 117
- 955
- 1
- 10
- 25
Here is how to make it in Ubuntu 18.04:
Open Files, press Ctrl+L and paste
/usr/share/applications.Look for the "Files" icon and copy it (right click > Copy)
Note: in my system, I don't know why, there are tree "Files" icon. For this procedure I selected the first one, which has 2,7kB. To make sure it'll work in your computer I recommend you to do the same.
Now open your personal folder and press Ctrl+H to show hidden files.
Once you've done it, navigate to
.local/share/applicationsand paste the file you copied in the step 2 into this folder.You'll see a new icon called
org.gnome.Nautilus.desktop. Right click on it and select "Open with other application". Select the Text Editor to open it and replace the content of the file with the following:[Desktop Entry] Name=Files Comment=Access and organize files Keywords=folder;manager;explore;disk;filesystem; Exec=nautilus --new-window %U Icon=org.gnome.Nautilus Terminal=false Type=Application Categories=GNOME;GTK;Utility;Core;FileManager; StartupWMClass=nautilus;Nautilus Actions=new-window;open-documents;open-downloads;open-pictures;open-music;open-videos; [Desktop Action new-window] Name=New window Exec=nautilus --new-window [Desktop Action open-documents] Name=Documents Exec=nautilus /home/YOUR-USER-NAME/Documents [Desktop Action open-downloads] Name=Downloads Exec=nautilus /home/YOUR-USER-NAME/Downloads [Desktop Action open-pictures] Name=Pictures Exec=nautilus /home/YOUR-USER-NAME/Pictures [Desktop Action open-music] Name=Music Exec=nautilus /home/YOUR-USER-NAME/Music [Desktop Action open-videos] Name=Videos Exec=nautilus /home/YOUR-USER-NAME/VideosReplace
YOUR-USER-NAMEby your username.Save the document and close it. You're done!
Note: If your system is in another language that not English replace the words of the filds
Name=andExec=of the desired[Desktop Action]for the equivalent in your language. See an example in Portuguese above:[Desktop Action open-pictures] Name=Pictures Exec=nautilus /home/YOUR-USER-NAME/PicturesIs going to be:
[Desktop Action open-pictures] Name=Imagens Exec=nautilus /home/YOUR-USER-NAME/ImagensFinally, replace the word of the field
Name=Filesof[Desktop Entry]according to whatFilesmeans in your language. In Portuguese, for example, Files is translated Arquivos, so I had to changeName=FilestoName=Arquivos. If you don't do this, you'll end up with two Files icons with different names in your computer.
Final result
- 67,112
- 21
- 233
- 243
- 409
- 1
- 6
- 16
-
The 3 files are *nautilus.desktop*, *nautilus-folder-handle.desktop*, and *org.gnome.Nautilus.desktop*. I also don't know what's the difference between the 3, but on my system the file sizes were different, and I only knew I copied the wrong file because what I pasted wasn't *org.gnome.Nautilus.desktop*. – Gino Mempin Sep 27 '19 at 00:00
-
An easier way to get this result is to `sudo apt-get install pcmanfm` and then `pcmanfm` to launch the pcmanfm file manager, navigate to the folder, right-click and add to favourites. – darth_epoxy Jul 20 '21 at 08:11
It's not prefect for what you seek, but you might be interested in the Gno-Menu extension.
The extension adds a quite configurable menu. The following shows it's default:
The recent documents I have accessed are shown on the right. The shortcuts on the left are set to the Places of Nautilus. The highlighted folder shortcut is to a folder I have "pinned" in Nautilus.
The Recents overview does not seem to support viewed folders. I don't know how the "Link to Intro etc." link got in there. Creating a new link to a folder and opening it did not put the folder there, and roaming in Nautilus does not affect Recents (until you open a file).
The right-hand side can also be configured to show your Favorites from the overview, where you could then add .desktop entries for Nautilus to open specific folders. (See pomsky's answer, but use Exec=nautilus /home/user/folder/ --new-window %U and include only the [Desktop Entry] part.)
- 8,115
- 11
- 45
- 72
I don't think getting "exactly" what you composed with pinta is feasible, if not dealing directly with code in GTK or other packages. In that case, this OP is more suitable for stackoverflow.
I guess you will increase your chances of getting something useful if you specify which aspects of the difference between your image and this image by pomsky you require as mandatory.
For instance, if you need the titles "Pinned" and "Frequent", plus the separators, that is likely built into GTK or else. If you mostly want to get access to some "Pinned" folders, without the title, that is already available. If you are ok with adding the "Frequent" folders, without the title, that is perhaps doable with a dynamic script that reads the information stored as per Settings -> Privacy -> File History & Trash, which should be enabled.
- 14,146
- 10
- 41
- 89
I think it can be much simpler.
When you open an application or a folder,
it shows in your dock by default.
When you close it, it goes away.
So when it IS open and showing in your dock,
Right-Click the icon and "Add to Favourites",
then it will remain and live happily in your dock.
- 671
- 1
- 7
- 19
-
Have you actually tried it? Can you really pin a *specific* **folder** (*not* an application) as the question asks for by this "Add to Favourites" method? I don't think you can. – pomsky Jul 31 '21 at 10:23
-
No hence the down vote. I assumed too much. However... An easier way to get this result is to `sudo apt-get install pcmanfm` and then `pcmanfm` to launch the pcmanfm file manager, navigate to the folder, right-click and add to favourites. – darth_epoxy Aug 02 '21 at 23:04
-
You mean "add to *bookmarks*"? That's not the same as what's being asked here though. And bookmarking is a feature of almost all (if not all) file managers. – pomsky Aug 03 '21 at 08:53









