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.

I have some scripts and some starters for programs I didn't install via the Software Center in my ~/bin folder. It is in my $PATH variable and I can use my scripts by pressing Alt+F2 and also directly in a terminal. How can I achieve that I can call them also with unity (pressing Super)?

Thanks

share|improve this question

2 Answers 2

up vote 2 down vote accepted
  1. Create a *.desktop file say as myscript.desktop, add command parameters as you want. In this case your script commands. See the below for more details on parameters of .desktop file.
  2. Test the launcher file (myscript.desktop) by double clicking, if working fine just drag myscript.desktop file to launcher bar.

Example : a .desktop file containing following code will launch gedit in name of "My Editor"

[Desktop Entry]
Encoding=UTF-8
Name= My Editor
Comment=Edit text files
Exec=gedit
Terminal=false
Type=Application
Icon=/usr/share/pixmaps/debian-logo.png

Note: you can also modify some properties of .desktop file (like command to execute) by right clicking the .desktop file and then go to properties

For a detailed guide, see here

share|improve this answer
1  
I just put the launcher in ~/.local/share/applications Thanks for the link –  Wauzl Apr 4 '12 at 18:21
    
You do not need to, nor should you, make .desktop files executable. –  dobey Apr 4 '12 at 20:02
    
Thanks for the corrections @dobey –  Web-E Apr 5 '12 at 11:49

You will need to create .desktop files for all of them, according to the XDG Desktop File Specification, and place the .desktop files in the $HOME/.local/share/applications/ directory.

share|improve this answer

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.