I want to add some folder to the launcher so that I can access them at ease. How do I add shortcut to launcher?
There are two ways:
You can add a shortcut to a folder by browsing (in nautilus) into the folder you want to add, and choose "add bookmark" from the bookmark menu. Alternatively, you can press Ctrl+D. Bookmarks you created this way are added automatically to the
Files icon in the launcher, in the top section (Nautilus adds these shortcuts to the file:
In the "static" section of the launcher's icon.
Alternatively, you can add a shortcut to the Files icon (or any other icon), by editing its .desktop file. This method gives you more control over the name of the shortcut, and the order of shortcuts, if you have more than one.
To do that, first copy the .desktop file to
cp /usr/share/applications/nautilus.desktop ~/.local/share/applications/nautilus.desktop
Open the (copied) file with gedit; it won't open by double-click, so open a gedit window and drag the file over the gedit window.
Look for the line:
Add a name that you would like to give your folder in the launcher:
At the end of the file, add a section like this:
[Desktop Action YourFolder] Name=YourFolder Exec=nautilus /path/to/thefolder OnlyShowIn=Unity;
Log out and back in, now you'll have your shortcut in the Files icon by right-click.
Icons in Dash and the launcher represent .desktop files. These icons have one "main" command (that's what happens if you click on it), but also can have a number of shortcuts (accessible by right-click).
This "main" command can be found in the
Exec= line, in the section directly below
[Desktop Entry], the shortcuts are listed in the line
Actions=, and defined in the
[Desktop Action YourFolder] - section(s).
.desktop files in
~/.local/share/applications overrule the ones in
/usr/share/applications, but the first time after you copy the original to the local directory, you have to log out/in. The clean procedure is always to edit the local one and leave the original untouched.
Bookmarks that you created by the first method, are added to the icon automatically, but are not part of the
Edit for 15.04 and later
The answer above applies for 15.04 and above as well, but the launcher to edit (locally copied) for the static section is:
protected by Community♦ Mar 26 '15 at 17:26
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?