View previous topic :: View next topic |
Author |
Message |
lnthai2002 Apprentice
Joined: 04 Nov 2005 Posts: 260
|
Posted: Tue Nov 29, 2005 10:04 pm Post subject: problem with remote administration with ssh[SOLVE] |
|
|
I intended to use a ssh client(putty or openssh secure shell) at school to do some time-comsumming tasks on my gentoo at home. At school, i login remotely as root to my gentoo at home and tried:
I saw a normal building process start, but i didnt wait for it to finish compiling the whole program, i disconnected from the server at home(i just click X on the ssh client, i didnt log out ). I though linux will continue compiling abiword for me, but when i got home, i recognized that abiword has not been emerged, i dont have it !!!
Is that normal? Is a session(in my case, root) will terminate as soon as i exit ?
If yes, then is there anyway that i can do a time-consumming task remotely(not just write a bash script and run it before going to school)? Sometimes when i am at school, i have to do some stuff on my comp, but i cant go home, so i need a way to control my comp remotely.
Last edited by lnthai2002 on Tue Dec 06, 2005 2:21 pm; edited 1 time in total |
|
Back to top |
|
|
bLaXe Tux's lil' helper
Joined: 14 Nov 2004 Posts: 81 Location: Berkshire, UK
|
Posted: Tue Nov 29, 2005 10:10 pm Post subject: |
|
|
I think you'll find that 'screen' will solve this for you.
Then when you login remotely simply type 'screen' and you will start a 'virtual' terminal. Start your emerge (or whatever) in this terminal.
You can now 'detatch' this terminal by pressing 'ctrl+a ctrl+d' - the process (emerge or whatever) will continue in the background. You can logout, or be disconnected and the process will continue. To re-attach the detatched 'screen' simply type 'screen -r'. There is much better description of this on the forums somewhere, have a bit of a search.
Screen can do much more than this (man screen). |
|
Back to top |
|
|
lnthai2002 Apprentice
Joined: 04 Nov 2005 Posts: 260
|
Posted: Wed Nov 30, 2005 2:57 am Post subject: |
|
|
Cool, this is definitely what i want. Thanks for your help. I will try it as soon as i finish stuf on window |
|
Back to top |
|
|
d_m Guru
Joined: 12 Jun 2003 Posts: 570 Location: Philadelphia, PA, USA
|
Posted: Wed Nov 30, 2005 3:57 am Post subject: |
|
|
While screen is probably better for a variety of reasons, it is always possible to do this without screen (assuming you don't want to watch the output) with something like:
Code: | nohup emerge foobar & |
This will put emerge in the background and it won't stop when you disconnect. You could also store the output with something like:
Code: | nohup emerge foobar > foobar.output 2>&1 & |
This will redirect output to "foobar.output", and redirected stderr there also. _________________ The name that can be named is not the eternal name. |
|
Back to top |
|
|
|
|
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
|
|