LinuxQuestions.org
Visit Jeremy's Blog.
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 11-22-2002, 12:22 PM   #1
mikeshn
Member
 
Registered: Feb 2002
Posts: 586

Rep: Reputation: 30
Running program when terminal closed?


I start the gaim , Kmail and other programs using terminal or shell. Of course, I use & to run the commnad in background.

However, when I close the TERMINAL or SHELL the programs that I started from terminal are gone..

Is it possible to do in such way, even I close terminal programs still will run?

Thanks
 
Old 11-22-2002, 12:57 PM   #2
zLinuxz
Senior Member
 
Registered: Feb 2002
Location: Shanghai, CHINA
Distribution: RH 5.0,5.1 6.0,6.1 7.0,7.1,7.2,7.3.,8.0,9.0, RH Enterprise, Fedora C1, C2
Posts: 1,216

Rep: Reputation: 45
sure, run them off the Menu, or make an applet on the navigation bar and click on, do not run in xterm window.
Also, there is sometimes else you could add to when you run something on an xterm so that it doesn't run off of that window. I'll check what it is, and post it as well.
 
Old 11-22-2002, 01:00 PM   #3
zLinuxz
Senior Member
 
Registered: Feb 2002
Location: Shanghai, CHINA
Distribution: RH 5.0,5.1 6.0,6.1 7.0,7.1,7.2,7.3.,8.0,9.0, RH Enterprise, Fedora C1, C2
Posts: 1,216

Rep: Reputation: 45
ahh, found it in my notes

at the prompt type the name of the application, i.e.:

[prompt]: gaim >& /dev/null &

that's it, or like I said you can just run it off an applet at the bar.
 
Old 11-22-2002, 02:38 PM   #4
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
Or you can place that in your .xinitrc file, or similar, right above the exec <wm> section.

So something like this might be your xinitrc file:

exec gkrellm &
exec gaim &
exec xfce

Cool
 
Old 11-22-2002, 03:22 PM   #5
zLinuxz
Senior Member
 
Registered: Feb 2002
Location: Shanghai, CHINA
Distribution: RH 5.0,5.1 6.0,6.1 7.0,7.1,7.2,7.3.,8.0,9.0, RH Enterprise, Fedora C1, C2
Posts: 1,216

Rep: Reputation: 45
eehmm, which I don't know how to do, nor could I after what you said MasterC,
 
Old 11-22-2002, 06:34 PM   #6
moses
Senior Member
 
Registered: Sep 2002
Location: Arizona, US, Earth
Distribution: Slackware, (Non-Linux: Solaris 7,8,9; OSX; BeOS)
Posts: 1,152

Rep: Reputation: 50
How do you kill the terminal or shell? If you use the menu bar, you're killing
all the children of that shell as well as the shell. If you type "exit" in the
shell, it should die without killing its children.
 
Old 11-22-2002, 06:41 PM   #7
stickman
Senior Member
 
Registered: Sep 2002
Location: Nashville, TN
Posts: 1,552

Rep: Reputation: 53
You could always use nohup to keep things going...
 
Old 11-22-2002, 08:24 PM   #8
zLinuxz
Senior Member
 
Registered: Feb 2002
Location: Shanghai, CHINA
Distribution: RH 5.0,5.1 6.0,6.1 7.0,7.1,7.2,7.3.,8.0,9.0, RH Enterprise, Fedora C1, C2
Posts: 1,216

Rep: Reputation: 45
that's why you run things that don't run on xterms, so that you can kill the xterm without any problems
 
Old 11-23-2002, 07:50 PM   #9
moses
Senior Member
 
Registered: Sep 2002
Location: Arizona, US, Earth
Distribution: Slackware, (Non-Linux: Solaris 7,8,9; OSX; BeOS)
Posts: 1,152

Rep: Reputation: 50
Quote:
Originally posted by zLinuxz
that's why you run things that don't run on xterms, so that you can kill the xterm without any problems
Yeah, but then you limit yourself to working like a windows (l)user, in that
you are only able to use what has an icon on your desktop. Not very
*NIX like. . . The command line is the reason I use *NIX -- it allows ME
to control what programs I have access to, not the distributor of the
system (mostly, and with linux and open source, I'm not even limited to
what the distributor packages).
Giving "mikeshn" an answer to the question of why something happens
provides the power to use linux more effectively and efficiently. What is
done with that power is up to the user.
 
Old 11-23-2002, 08:00 PM   #10
Aussie
Senior Member
 
Registered: Sep 2001
Location: Brisvegas, Antipodes
Distribution: Slackware
Posts: 4,590

Rep: Reputation: 58
Try using <Alt>+<F2> to bring up a command prompt, and start your app from there, also in your gnome/kde controlcenter there will be an option to restore settings, that way when you log out every app running will start next time you log in.
 
  


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
Question about running a program from terminal window ganoo Linux - Newbie 7 11-01-2010 12:44 PM
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 to shutdown after a specific program is closed tlilja Linux - General 2 02-23-2005 09:03 AM
Running a Program in a new Virtual Terminal Johnsernickle Linux - Software 2 07-09-2004 11:50 AM
terminal program metallica1973 Linux - Networking 1 02-23-2003 10:09 PM

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

All times are GMT -5. The time now is 05:53 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
Open Source Consulting | Domain Registration