LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 10-01-2005, 10:01 AM   #1
kornerr
Member
 
Registered: Dec 2004
Location: Russia, Siberia, Kemerovo
Distribution: Slackware
Posts: 893

Rep: Reputation: 35
How to launch an app in terminal, & keep it running after I close terminal?


I like terminal, but sometimes I need to use Nautilus to launch, e.g., PDF viewer.
Then I usually close Nautilus and go on watching PDF.
I want to do the same from within terminal.

Is there a way to launch an app from terminal, and keep it running after I close the terminal?
(I'm not asking of "&" suffix)

Thanks.
 
Old 10-01-2005, 11:04 AM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,337

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
"Is there a way to launch an app from terminal, and keep it running after I close the terminal?
(I'm not asking of "&" suffix)"

You could minimize the terminal.

----------------------
Steve Stites
 
Old 10-01-2005, 11:28 AM   #3
aysiu
Senior Member
 
Registered: May 2005
Distribution: Ubuntu with IceWM
Posts: 1,775

Rep: Reputation: 86
Don't launch it from terminal. Use the "Run" command instead.
 
Old 10-01-2005, 11:46 AM   #4
perfect_circle
Senior Member
 
Registered: Oct 2004
Location: Athens, Greece
Distribution: Slackware, arch
Posts: 1,783

Rep: Reputation: 53
Re: How to launch an app in terminal, & keep it running after I close terminal?

Quote:
Originally posted by kornerr
I like terminal, but sometimes I need to use Nautilus to launch, e.g., PDF viewer.
Then I usually close Nautilus and go on watching PDF.
I want to do the same from within terminal.

Is there a way to launch an app from terminal, and keep it running after I close the terminal?
(I'm not asking of "&" suffix)

Thanks.
hi kornerr, you are looking for the "nohup" command. Next time you launch such a command from a terminal, launch it like this:
Code:
nohup <command>
 
Old 10-01-2005, 03:39 PM   #5
Komakino
Senior Member
 
Registered: Feb 2004
Location: Somerset, England
Distribution: Slackware 10.2, Slackware 10.0, Ubuntu 9.10
Posts: 1,938

Rep: Reputation: 55
alternatively, once you have it running in the background, type:
Code:
exit
to close the terminal and leave the app running.
 
Old 10-01-2005, 06:09 PM   #6
perfect_circle
Senior Member
 
Registered: Oct 2004
Location: Athens, Greece
Distribution: Slackware, arch
Posts: 1,783

Rep: Reputation: 53
Thats true, I had never noticed this. Typing "exit" or pressing CTRL+D in the terminal also does the job.
I think I learned something today....
 
Old 10-01-2005, 10:13 PM   #7
kornerr
Member
 
Registered: Dec 2004
Location: Russia, Siberia, Kemerovo
Distribution: Slackware
Posts: 893

Original Poster
Rep: Reputation: 35
Thanks, perfect_circle, Komakino.

Never knew that "exit" is so smart
 
Old 06-24-2006, 05:54 PM   #8
spiral out
LQ Newbie
 
Registered: Jun 2006
Posts: 2

Rep: Reputation: 0
and i found out that when you run in terminal window:
Code:
<program> &exit
the terminal will close automatically...

maybe old news...
 
  


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
can you close a cd drive from the terminal? dr_zayus69 Linux - Hardware 5 07-04-2021 06:13 AM
Check if an app is running and if it's not launch this app Coume Linux - General 3 07-28-2008 02:34 AM
Problem running console app in X with no terminal (as a desktop shortcut) kornerr Linux - General 1 02-04-2005 12:08 AM
Alternative terminal to konsole & gnome-terminal Adony Linux - Software 3 10-08-2004 03:59 AM
lines remaining when I launch an app or terminal spiteres Linux - General 0 05-27-2003 06:24 AM

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

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