Tue 12 May 2009
Gnome Application Launcher – Run Application in Certain Directory
Posted by admin under bash , gnome , ubuntuComments Off
This would be easy in kde, but in gnome some extra steps are needed. I changed to gnome just recently being impressed by the clarity and simplicity of the user interface. Being used to the “kde way” I needed some time to figure that out.
This is an example for kdissert:
Create a wrapper script for example kdissert.sh in ~/bin/launch and make it executable
#!/bin/bash cd ~/Known nohup kdissert > /dev/null 2>&1 & exit 0
Then use the panel menu to create a Custom Application Launcher : Add to panel -> Custom Application Launcher -> Choose Type: Application, Command: /home/yourusername/bin/launch/kdissert.sh
Another way is to use shell directly. But watch out – you will need to source your .bashrc if needed:
[Desktop Entry] Version=1.0 Encoding=UTF-8 Name=netbeans with some environment settings Exec=/bin/bash -c '. ~/.bashrc; ~/workarea/nb_run.sh' # to run it in a terminal: # Exec=gnome-terminal --command "/bin/bash -c '. ~/.bashrc; ~/workarea/nb_run.sh' " Icon=/home/kostja/bin/netbeans-6.5rc2/nb6.5/netbeans.png Categories=Development;Java;IDE StartupNotify=true Type=Application