-   Linux - Desktop (
-   -   Shell command to start program? (

neilcpp 10-02-2006 10:38 AM

Shell command to start program?
I have a program that normally can only be started from the terminal. Now, my terminal uses the bourne shell. I want to create a icon on the desktop to start the program. It will not start by simply giving the path name, because the shell needs to be invoked first - i think!

I need to now what shell command I need to insert in the icon command path, so the program will fire up under a terminal window, when i click the icon.

KenJackson 10-02-2006 11:07 AM

You can create a little shell script like this:

command to be run

Put it someplace, like ~/bin/commandscript, make it executable with

chmod +x ~/bin/commandscript
and then use $HOME/bin/commandscript with you icon.

forbajato 10-07-2006 04:53 AM

If you need your terminal to stay open with the program running in it you may want to check your terminal's command options when writing the script. For instance I use xterm as my terminal so if I want to execute program foo with arguments -i bar -e BAR in a new terminal I may issue the command:

xterm -e foo -i bar -e BAR

The -e after xterm passes what comes after it as a command to be run in the terminal. If you wrap this type command into your script then call the script from an icon that should work.

All times are GMT -5. The time now is 11:36 AM.