Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Running emerge while not logged on
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Duplicate Threads
View previous topic :: View next topic  
Author Message
jl_678
n00b
n00b


Joined: 12 Dec 2003
Posts: 56

PostPosted: Sat Feb 26, 2005 2:26 am    Post subject: Running emerge while not logged on Reply with quote

Hi,

I manage two different Gentoo boxes, and am happy to say that they both have been running great. I prefer a minimal configuration so both machines do not have X Windows are accessed only via SSH. That said, one of the challenges with Gentoo is the amount of time it takes to add/update apps because of the recompile. How I do it now is login via SSH, begin the emerge and then leavew while the process runs on my laptop. That works fine, but I would like to find a way to allow me to start emerge and then to logoff and let the machine finish it. I am certain that this is doable, but have not found a way yet.

The problem is that as soon as I log out, all compilation stops. Is there a way that I can logon, beging the emerge and then logoff while leaving the emerge process running?

TIA.

JL
Back to top
View user's profile Send private message
PowerFactor
Veteran
Veteran


Joined: 30 Jan 2003
Posts: 1693
Location: out of it

PostPosted: Sat Feb 26, 2005 3:05 am    Post subject: Reply with quote

app-misc/screen is probabaly what you're looking for.
Back to top
View user's profile Send private message
BitJam
Advocate
Advocate


Joined: 12 Aug 2003
Posts: 2486
Location: Silver City, NM

PostPosted: Sat Feb 26, 2005 3:06 am    Post subject: Reply with quote

The program you need is called "screen":
Code:
$ emerge screen
$ man screen
$ screen
$ emerge whatever

Then you can just close the ssh session (for example by closing the window). Then after you log in again, just run
Code:
$ screen -r

and you should see the tail end of the emerge if you waited long enough.
Back to top
View user's profile Send private message
wjholden
l33t
l33t


Joined: 01 Mar 2004
Posts: 826
Location: Augusta, GA

PostPosted: Sat Feb 26, 2005 2:20 pm    Post subject: Reply with quote

The ghetto thing to do is put it in the background with the "&" and logout...but I'll have to try this screen thing. Thanks guys!
Back to top
View user's profile Send private message
nizar
Apprentice
Apprentice


Joined: 19 Dec 2003
Posts: 264
Location: localhost

PostPosted: Sat Feb 26, 2005 3:58 pm    Post subject: Reply with quote

destuxor wrote:
The ghetto thing to do is put it in the background with the "&" and logout...but I'll have to try this screen thing. Thanks guys!


You need nohup for this.
Back to top
View user's profile Send private message
BitJam
Advocate
Advocate


Joined: 12 Aug 2003
Posts: 2486
Location: Silver City, NM

PostPosted: Sat Feb 26, 2005 3:59 pm    Post subject: Reply with quote

destuxor wrote:
The ghetto thing to do is put it in the background with the "&" and logout...but I'll have to try this screen thing. Thanks guys!

Good luck with that. If you want to go that route, you may want to try using it together with the nohup command, otherwise you will kill the child when the parent dies.
Back to top
View user's profile Send private message
amne
Bodhisattva
Bodhisattva


Joined: 17 Nov 2002
Posts: 6378
Location: Graz / EU

PostPosted: Sat Feb 26, 2005 5:46 pm    Post subject: Reply with quote

This topic has been discussed every now and then, e.g. here

Moved from GC.
_________________
Dinosaur week! (Ok, this thread is so last week)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Duplicate Threads 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