5

Is it possible to put a shortcut to a file (like a application launcher but opens a file instead of launching a program) in the Unity launcher, and if so, how?

htorque
  • 64,798
melodram
  • 711

1 Answers1

6

I only know a dirty way:

  1. Create a file ~/.local/share/applications/myfile.desktop
  2. Add the following to that file:

    [Desktop Entry]
    Name=MyFile
    Exec=gedit /path/to/a/text/file
    Icon=text
    Terminal=false
    Type=Application
    StartupNotify=true
    
  3. Save it and make that file executable:

    chmod +x ~/.local/share/applications/myfile.desktop
    
  4. Now browse to that file in Nautilus and drag it to the launcher.

This will add a launcher with a text icon, that opens /path/to/a/text/file with gedit:

enter image description here

Of course you need to change application/file/icon to whatever you want.

htorque
  • 64,798
  • 2
    why didn't they make it easer to create links to files? in gnome-panel, every user was able to add, remove, edit things easily and according to his/her wishes. unity looks great, but i miss the individuality, the possibility to personalize, change. – melodram Mar 11 '11 at 22:08