LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices



Reply
 
Search this Thread
Old 10-02-2006, 10:38 AM   #1
neilcpp
Member
 
Registered: Jul 2003
Location: England
Distribution: Debian Wheezy, FreeBSD 10.0 anything *nix to get my fix
Posts: 328

Rep: Reputation: Disabled
Unhappy 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.
thnaks
 
Old 10-02-2006, 11:07 AM   #2
KenJackson
Member
 
Registered: Jul 2006
Location: Maryland, USA
Distribution: Fedora, Arch
Posts: 572

Rep: Reputation: 64
You can create a little shell script like this:
Code:
#!/bin/bash
command to be run
Put it someplace, like ~/bin/commandscript, make it executable with
Code:
chmod +x ~/bin/commandscript
and then use $HOME/bin/commandscript with you icon.
 
Old 10-07-2006, 04:53 AM   #3
forbajato
LQ Newbie
 
Registered: Jul 2005
Distribution: Suse 9.2, 10.0
Posts: 6

Rep: Reputation: 0
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Run Shell COmmand on start-up evilmonkey Linux - Software 3 05-21-2006 06:24 PM
Call Linux Shell Command from within *.c program in userspace? pat_and_cami Suse/Novell 1 03-08-2006 03:39 AM
can't start program from shell roxxe1 Linux - General 11 04-24-2005 08:58 PM
How to run a shell command containing awk, and grep within a C program Linh Programming 3 06-05-2003 08:05 PM
Running a shell command containing awk and grep within a C program Linh Programming 1 06-05-2003 07:51 PM


All times are GMT -5. The time now is 06:01 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration