2

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

2 Answers 2

2
  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

2
  • 1
    I just put the launcher in ~/.local/share/applications Thanks for the link
    – Wauzl
    Apr 4, 2012 at 18:21
  • You do not need to, nor should you, make .desktop files executable.
    – dobey
    Apr 4, 2012 at 20:02
1

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.

You must log in to answer this question.

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