Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.

share|improve this question

2 Answers 2

up vote 9 down vote accepted

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 (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.

share|improve this answer
2  
Very clever, well done, I thought this was impossible! –  Jorge Castro Oct 18 '11 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 '12 at 10:00

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.

share|improve this answer
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 '11 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. –  Jo-Erlend Schinstad Oct 18 '11 at 23:45

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.