Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Will an emerge continue if I terminate my shell?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
wolfenstein
n00b
n00b


Joined: 23 Nov 2003
Posts: 39

PostPosted: Mon Dec 01, 2003 6:17 pm    Post subject: Will an emerge continue if I terminate my shell? Reply with quote

If I use Putty on a Windows box to shell in (using SSH) to my Gentoo box at home, will an emerge I start - continue if I close Putty?

For example, I want to kick off a long KDE compile from work, so I shell in using Putty - then I want to exit Putty but have the emerge continue.

Is there a way to this?

thx
Back to top
View user's profile Send private message
ralph
Advocate
Advocate


Joined: 02 Mar 2003
Posts: 2001
Location: Hamburg

PostPosted: Mon Dec 01, 2003 6:29 pm    Post subject: Reply with quote

emerge screen

:D
_________________
The computer can't tell you the emotional story. It can give you the exact mathematical design, but what's missing is the eyebrows.
- Frank Zappa
Back to top
View user's profile Send private message
teilo
Apprentice
Apprentice


Joined: 20 Jun 2003
Posts: 276
Location: Minneapolis, MN

PostPosted: Mon Dec 01, 2003 6:35 pm    Post subject: Reply with quote

Quote:
If I use Putty on a Windows box to shell in (using SSH) to my Gentoo box at home, will an emerge I start - continue if I close Putty?


No, it will not.

What you are really looking for is screen.

Code:
emerge screen


This program is extremely easy to use, and probably the single most useful utility that I have ever found for Linux administration. Here is what screen does in a nutshell:

When you run it, it starts a new shell, running in a virtual terminal, with your current teminal attached to it as a display. If your current terminal, say Putty, dies, the virtual terminal continues to run.

You can re-connect to a screen virtual terminal from anywhere: ssh, Xterm, tty.

To start a screen session, just type
Code:
screen


To detach from the terminal, type Ctrl-A D.

To reattach to the screen (presuming you have only a single screen session running, type:
Code:
screen -r


That is the absolute minimum that you need to know to get started.

There are many other commands and features that you may find helpful. You can start additional shells (or windows, in screen's parlance) from within any given screen session by typing Ctrl-A C. You can switch between these windows with various commands, such as Ctrl-A [space]. VERY NICE to be able to have multiple shells running from within a single Putty window.

I use screen to do all my emerging. I can start a merge on a server at work, and re-attach via SSH at home. I can even start a merge from the command prompt on my laptop, detach. Start X, and re-attach to the merge in an Xterm.

Just a few of the endless possibilities with this wonderful program.
_________________
Teilo who is called Teilo
Back to top
View user's profile Send private message
wolfenstein
n00b
n00b


Joined: 23 Nov 2003
Posts: 39

PostPosted: Mon Dec 01, 2003 7:00 pm    Post subject: Reply with quote

Awesome - I will start using it today!

thx
Back to top
View user's profile Send private message
papasan
Tux's lil' helper
Tux's lil' helper


Joined: 15 Oct 2003
Posts: 87

PostPosted: Wed Dec 03, 2003 11:10 am    Post subject: Reply with quote

you could also 'nohup' it. man nohup.

btw, nohup seems to not nohup if you exit out of your su, but if you just close the window instead of typing exit it carries on.
Back to top
View user's profile Send private message
red-wolf76
l33t
l33t


Joined: 13 Apr 2005
Posts: 714
Location: Rhein-Main Area

PostPosted: Thu Dec 01, 2005 1:57 am    Post subject: Reply with quote

Hey, I've run into the problem that sometimes screens will die for no apparent reason or reasons that I didn't spot yet in the docu... So in those cases, I can't tell if the job I set a box to under screen has finished or not.

Anybody know if screens "go bad" after some hours/days?
_________________
0mFg, G3nt00 r0X0r$ T3h B1g!1111 ;)

Use sane CFLAGS! If for no other reason, do it for the lulz!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum