11

How can I add a folder to the launcher for quick access to it. In this particular case I wish to drag it to the launcher.

3 Answers 3

11
  1. First create a desktop configuration file: gedit ~/.local/share/applications/folder-shortcut.desktop
  2. Copy and paste the following content to launch nautilus (the file explorer) with the specified folder

    [Desktop Entry]
    Name=Home Folder
    Comment=Open YOURFOLDER
    Exec=nautilus YOURFOLDER
    Icon=folder
    Terminal=false
    StartupNotify=true
    Type=Application
    OnlyShowIn=GNOME;Unity;
    Categories=GNOME;GTK;Core;
    X-GNOME-Bugzilla-Bugzilla=GNOME
    X-GNOME-Bugzilla-Product=nautilus
    X-GNOME-Bugzilla-Component=general
    X-GNOME-Bugzilla-Version=3.0.0
    X-Ubuntu-Gettext-Domain=nautilus
    Actions=Window;
    NoDisplay=true
    
    [Desktop Action Window]
    Name=Open YOURFOLDER
    Exec=nautilus YOURFOLDER
    OnlyShowIn=Unity;
    

    Replace "YOURFOLDER" with the path to your folder

  3. Now navigate to this file graphically from nautilus and drag it to your launcher

1
  • Works. Thanks Marawan. I would remove the sudo from the first line since that folder is owned by the actual user. Oct 19, 2014 at 22:57
11

I'm not sure if it's possible to drag and drop a folder onto your unity bar - but you can have the same functionality with a bit of editing.

  • Edit Nautilus .desktop file
    1) In a terminal (Ctrl+ALT+T) type: gedit ~/.local/share/applications/nautilus-home.desktop
    2) If this already exists, edit the following line to add your NEWFOLDER shortcut:

    X-Ayatana-Desktop-Shortcuts=Videos;Documents;Music;Pictures;Downloads;Dropbox;NEWFOLDER  
    

    3) Below X-Ayatana-Desktop-Shortcuts add a new shortcut group:

    X-Ayatana-Desktop-Shortcuts=Videos;Documents;Music;Pictures;Downloads;Dropbox;NEWFOLDER
    [NEWFOLDER Shortcut Group]
    Name=New Folder
    Exec=nautilus ~/Documents/newfolder
    TargetEnvironment=Unity
    

    Where ~/Documents/newfolder is the location of the shortcut you want to add.
    (N.B. if this file doesn't already exist you can use a copy of mine.)
    4) Type into Run prompt (ALT+F2): unity --replace

Now when you right click your home folder/nautilus shortcut you will see an extra option for new folder.

  • Create a new .desktop file for your folder shortcut.
    1) Run gedit again: gedit ~/.local/share/applications/folder-shortcut.desktop
    2) Fill in the file with a sample as follows:

    [Desktop Entry]  
    Exec=nautilus Documents/newfolder  
    Version=1.0  
    Name=New Folder  
    GenericName=ew Folder 
    X-GNOME-FullName=ew Folder 
    Comment=Open New Folder
    Icon=/usr/share/pixmaps/gnome-computer.png  
    StartupNotify=true  
    Terminal=false  
    Type=Shortcut  
    

    2) Save the file and open the location in nautilus.
    3) Drag it onto the unity bar.
    4) Right click the new icon and click Keep in Launcher

N.B. you do not need to refresh unity for this one.

2
  • 2
    Very clever, well done, I thought this was impossible! Oct 18, 2011 at 22:50
  • I'm not sure about the second half - it won't drag to the unity bar. But the first half works great!
    – talljosh
    Apr 8, 2012 at 10:00
-1

That's not possible, as that's not what the launcher is for. The bookmarks are displayed in the files lens. If you want an extra bar for your bookmarks, web links, etc, then I suggest adding an xfce4-panel.

2
  • 2
    Wouldn't say that's not what the launcher is for. It is essentially a dock of shortcuts (*.desktop). So quite feasible to launch a specific folder location through nautilus.
    – kikixx
    Oct 18, 2011 at 22:44
  • 2
    No, it is not. Applications actively use the launcher as part of its program. Launcher entries are not static shortcuts. They are program components, with menus, progressbars and counters. Also, they provide keyboard shortcuts to run the application, but also to focus it. Oct 18, 2011 at 23:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .