LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 06-07-2003, 06:17 PM   #1
DKnight
LQ Newbie
 
Registered: Oct 2002
Location: Miami as in FL
Distribution: MANDRAKE 9.1
Posts: 21

Rep: Reputation: 15
Question How does one launch programs 'out of process' in a terminal window?


When I'm in an X terminal window and I envoke mplayer or gkrellm or any other program that I may want running in the background it ties up the terminal window I launched it from.

I realize I can use the 'Run' menu option in REDHAT 9.0 to set off a program and that I can also add a panel 'launcher' control that does the same thing. But I was wondering if there was any option for envoking a program *specifically* in the terminal window, having it lauch and continue to run but *immediately* get back my prompt in the terminal window I launched it from ... in programming I believe this is called an 'out of process' call where the calling program or shell does not have to wait for the envoked command or application to terminate before it continues on with its next task or in this case returns control to the user.

Any help on this would be appreciated. Having a little trouble launching gkrellm when I log in and it's ticking me off. When I add the command to lauch it (/sbin/gkrellm) to the end of ~/.bash_profile it launches gkrellm but sits there without starting anything else until I close gkrellm then it loads my panels, icons and background theme etc ... I also tried adding it to the end of /etc/X11/xinit/xinitrc but the same thing occurs.

So my question is really 2 fold. Any takers?

I'm running redhat 9.0 and kernel 2.4.20-18.9

I spent all morning on this and am still researching it in REDHAT's pdf docs ... so far to no avail.
 
Old 06-07-2003, 07:13 PM   #2
nakkaya
LQ Guru
 
Registered: Jan 2003
Location: Turkey&USA
Distribution: Emacs and linux is its device driver(Slackware,redhat)
Posts: 1,398

Rep: Reputation: 45
use a bash script to execute the command you want that way you should get your command prombt back
 
Old 06-07-2003, 09:18 PM   #3
Riley
Member
 
Registered: Feb 2003
Location: SC, USA
Distribution: Mandrake 10.0 Powerpack
Posts: 178

Rep: Reputation: 30
what i like to do is create a link to application (right click menu in KDE at least) and it allows you to execute a command with options and all just like from the command line and then just click once on it to open it without a terminal or anything
 
Old 06-07-2003, 09:47 PM   #4
DKnight
LQ Newbie
 
Registered: Oct 2002
Location: Miami as in FL
Distribution: MANDRAKE 9.1
Posts: 21

Original Poster
Rep: Reputation: 15
Nakkaya, could I trouble you for a code example?

I created a file with a single command in it, that command is:

gkrellm

saved it and chmodded it to give all execute then I set it off via command line and it does fire gkrellm but does not give me back the command line prompt until I shut gkrellm down.

Was this what you were suggesting or did I implement this incorrectly?

Riley, thanks for the suggestion. I may have to do that until I can figure out the out of process thing .... It would be smooth if I could get it to fire at login since I will always want it online....

Any other advice would be most welcome.

Last edited by DKnight; 06-07-2003 at 09:49 PM.
 
Old 06-07-2003, 09:49 PM   #5
Wynd
Member
 
Registered: Jul 2001
Distribution: Slackware 12
Posts: 511

Rep: Reputation: 32
Try doing:
Code:
command &
The "&" means "run this program in the background", so you should get the prompt back.

 
Old 06-07-2003, 10:11 PM   #6
DKnight
LQ Newbie
 
Registered: Oct 2002
Location: Miami as in FL
Distribution: MANDRAKE 9.1
Posts: 21

Original Poster
Rep: Reputation: 15
Lightbulb

HAHA! That did it! An ampersand preceeded by a space ... never would have figured.

Thanks to you all! The devil is indeed in the details.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to launch an app in terminal, & keep it running after I close terminal? kornerr Linux - General 7 06-24-2006 05:54 PM
How do I launch Steam in a Window? Hoagie Linux - Games 2 05-18-2004 06:04 PM
Executing programs from a terminal window subzero0 Linux - General 0 09-26-2003 12:36 PM
impossible to launch a terminal session xnnc Mandriva 7 09-15-2003 06:39 PM
How to launch new programs ? mdcooper Linux - Newbie 3 03-04-2003 10:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:07 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