4

Possible Duplicate:
How to drag a folder to the launcher from Nautilus

Why isn't it allowed automatically? How can I do it? Thanks. If it's not possible, how can I access folder in the fastest way? How do you do it?

4
  • This link has an answer and a quick example. Good luck! askubuntu.com/questions/80013/…
    – darkdragn
    Apr 27, 2012 at 4:33
  • Well, this is for 12.04 Apr 27, 2012 at 4:38
  • 4
    @darkdragn That's for a program. This is specifically about pinning arbitrary files/folders, which is different. Apr 27, 2012 at 5:08
  • @WarriorIng64 Couldn't the user just put Exec= nautilus /media/dumpLocal in the .desktop file to open the desired folder. If they want a file, just come up with the program that launches it, and put it with a ref to the file in the exec line.
    – darkdragn
    Apr 27, 2012 at 9:12

2 Answers 2

2

You can use the way described by darkdragn. This way you can add your own quick menues. You find a complete guide to that method here: http://maketecheasier.com/8-really-useful-ubuntu-unity-quicklists/2011/05/07 (and on a lot of other pages)

1

What you can do is to create a bash shell script executes the application you want with the file as the argument to be opened. Save that script in /usr/local/bin and permit execution. Then create a launcher that executes your script. Here's an example where I decrypt a file display it with leafpad and when leafpad is terminated, delete the created file.

#!/bin/bash
#Decrypt notecase
gpg -o ~/Bin/.notecase -d ~/WIP/notecase.txt.gpg
leafpad ~/Bin/.notecase
rm ~/Bin/.notecase

The following is the launcher file I created by editing a copy of system notecase.desktop file. Items I changed start and end with ** which you'd remove before saving as notecase.desktop. I stored it in ~/.local/share/applications/notecase.desktop and then dragged that file icon to the launcher bar.

[Desktop Entry]
Categories=Application;Office;Utility;
Comment=**Notes Manager**
Encoding=UTF-8
Exec=**notecase**
GenericName=Hierarchical Note Manager
Icon=**/usr/share/icons/Faenza/apps/scalable/gnome-sticky-notes-applet.svg**
MimeType=application/notecase-plain;application/notecase-enc;
Name=**NoteCase notes manager**
Name[en_US]=NoteCase
Terminal=false
TryExec=notecase
Type=Application
X-HildonDesk-ShowInToolbar=true
X-Osso-Service=com.nokia.notecase
X-Osso-Type=application/x-executable
X-Window-Icon=notecase
X-Window-Icon-Dimmed=notecase

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