HowToAddaLauncher

Revision 1 as of 2006-01-28 02:26:33

Clear message

The Easy Way

  • First of all, see Desktop User Guide / Working With Panels / Launchers / To Add A Launcher to a Panel page in help for more complex and less straightforward info.
  • Right-click unused space in any panel.
  • Choose Add To Panel...
  • Choose Custom Application Launcher
  • Fill in Name, Generic Name and Comment at your will
  • Important field is Command - fill in a command you want to be called by a launcher
  • Choose from /usr/share/icons/crystalsvg/16x16/apps/ or elsewhere or make yourself using GIMP or any other graphic editor an icon.
  • Your launcher should just work now.

The Hard Way

  • What if this just does not work?
  • Some programs - for example some run under Wine - needs some additional commands before they can be started or some Java programs need to be started from within the directory they have their files in. Unfortunately launchers do not get bash environment so you cannot just put them in Command field
  • Insted, you need to make a bash script. Do not worry, it is simple
  • Just create a file somewhere in you $PATH, for example

sudo vi /usr/local/bin/sampleprogram

  • Fill it something like this (you need to press "i" to start typing or pasting in VI):

<your command>
<your command>
<your command>
  • Press escape and then type :wq in order to save the file and leave VI
  • Make the file executable:

sudo chmod +x /usr/local/bin/sampleprogram
  • fill Command with /usr/local/bin/sampleprogram (or just sample program, but be sure to update tour database before that, i.e.

{{{sudo updatedb }}} ) and it should just work now.

Examples of bash scripts

#/bin/bash
WINEDLLOVERRIDES=\"ole32,usp10,msvcrt=n\"
wine $HOME/.wine/drive_c/Program\ Files/Google/Google\ Earth/GoogleEarth.exe

cd $HOME/Movietheque/
$HOME/Movietheque/Movietheque.run