LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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, 09:38 AM   #1
neilcpp
Member
 
Registered: Jul 2003
Location: England
Distribution: Debian Jessie, FreeBSD 10.1 anything *nix to get my fix
Posts: 329

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, 10:07 AM   #2
KenJackson
Member
 
Registered: Jul 2006
Location: Maryland, USA
Distribution: Fedora and others
Posts: 757

Rep: Reputation: 145Reputation: 145
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, 03: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



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 05:24 PM
Call Linux Shell Command from within *.c program in userspace? pat_and_cami SUSE / openSUSE 1 03-08-2006 02:39 AM
can't start program from shell roxxe1 Linux - General 11 04-24-2005 07:58 PM
How to run a shell command containing awk, and grep within a C program Linh Programming 3 06-05-2003 07:05 PM
Running a shell command containing awk and grep within a C program Linh Programming 1 06-05-2003 06:51 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 06:39 PM.

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
Open Source Consulting | Domain Registration