LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-22-2014, 04:24 PM   #1
battles
Member
 
Registered: Apr 2014
Distribution: Debian GNU/Linux 7.5 (wheezy)
Posts: 231

Rep: Reputation: 5
Starting program from a terminal


I have placed a program out on a server. When I start it through the Putty terminal screen wherein I service the program, the cursor disappears and there is no way to get control of the terminal screen again (except ^C). If I simply click X button and close the Putty terminal window (from Win7), the program apparently stops running. The reason I think it has stopped is because when I log back in, it is not in the ps -ef list. How can I start such a program wherein it keeps running and where I can properly logout of Putty?
 
Old 04-22-2014, 04:43 PM   #2
Habitual
LQ Addict
 
Registered: Jan 2011
Posts: 8,474
Blog Entries: 11

Rep: Reputation: 2382Reputation: 2382Reputation: 2382Reputation: 2382Reputation: 2382Reputation: 2382Reputation: 2382Reputation: 2382Reputation: 2382Reputation: 2382Reputation: 2382
start the program in "screen"

Connect > type screen
type program_name
Ctrl+Alt+D will disconnect you from the screen and leave the program running.

To reconnect.
connect to host and type
Code:
screen -ls
and if there is only 1 'hit', type
Code:
screen -x
 
Old 04-22-2014, 04:55 PM   #3
battles
Member
 
Registered: Apr 2014
Distribution: Debian GNU/Linux 7.5 (wheezy)
Posts: 231

Original Poster
Rep: Reputation: 5
Quote:
Originally Posted by Habitual View Post
start the program in "screen"

Connect > type screen
type program_name
Ctrl+Alt+D will disconnect you from the screen and leave the program running.

To reconnect.
connect to host and type
Code:
screen -ls
and if there is only 1 'hit', type
Code:
screen -x
Not quite understanding this. Is screen a part of linux ubuntu or debian? Something that has to be apt-get?

I started the putty terminal and entered 'screen' but invalid command. Shows my experience with linux.

I am using debian 7.1 terminal/no GUI.
 
Old 04-22-2014, 05:36 PM   #4
battles
Member
 
Registered: Apr 2014
Distribution: Debian GNU/Linux 7.5 (wheezy)
Posts: 231

Original Poster
Rep: Reputation: 5
Screen

Got it. Installed screen on debian. I thought that screen was some kind of ubuntu thingy. Thanks.
 
Old 04-22-2014, 06:06 PM   #5
michaelk
Moderator
 
Registered: Aug 2002
Posts: 15,931

Rep: Reputation: 1825Reputation: 1825Reputation: 1825Reputation: 1825Reputation: 1825Reputation: 1825Reputation: 1825Reputation: 1825Reputation: 1825Reputation: 1825Reputation: 1825
Here is some information about how to disconnect an application from the terminal. In addition to screen there is tmux, nohup and disown.


http://en.wikipedia.org/wiki/Nohup
 
Old 04-22-2014, 06:18 PM   #6
battles
Member
 
Registered: Apr 2014
Distribution: Debian GNU/Linux 7.5 (wheezy)
Posts: 231

Original Poster
Rep: Reputation: 5
Good

Nice, thanks much. That looks like the simplest. Finding all kinds of things on LQ.
 
  


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
[SOLVED] getting back to [user@domain ~]$ after starting a program (terminal) OK2BCK Linux - Newbie 10 05-09-2012 04:32 AM
Automatically starting a program in a new terminal Uruclef Linux - General 2 05-05-2007 01:46 PM
Starting a program so it opens in a new terminal dangerousdave Linux - Newbie 1 03-24-2005 04:26 PM
Starting program with terminal TazLinux Linux - General 8 02-26-2003 07:16 AM
Starting a forking program in terminal Ztyx Linux - General 2 11-09-2002 05:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:46 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration