Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Terminal Session
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
SnackMasterX
Apprentice
Apprentice


Joined: 26 Jan 2006
Posts: 231

PostPosted: Thu Dec 16, 2010 7:53 pm    Post subject: [SOLVED] Terminal Session Reply with quote

So this is something I've wondered for quite some time, shortest way of asking is this:

Is there a way to take control of an SSH session from the host machine through a terminal in gnome?

I have an SSH connection opened up from my windows machine and wanted to close it but not stop its compiling and still be able to watch its progress from my gentoo box.


Last edited by SnackMasterX on Thu Dec 16, 2010 9:18 pm; edited 1 time in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54244
Location: 56N 3W

PostPosted: Thu Dec 16, 2010 8:18 pm    Post subject: Reply with quote

SnackMasterX,

You need screen.

emerge screen.
Log in as your user and start screen (locally or via ssh) start a long process like
Code:
emerge world -uDNav

Now detach from screen with Ctrl- A, D and log out.
Screen continues to run and so do the process(es) you started in screen.

Now you can log in from anywhere in the world and reattach to screen with screen -x
Screen can do much more and you can have several instances of screen running.
Read man screen
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
SnackMasterX
Apprentice
Apprentice


Joined: 26 Jan 2006
Posts: 231

PostPosted: Thu Dec 16, 2010 8:22 pm    Post subject: Reply with quote

This sounds awesome, I'm going to test it out over the weekend, thanks!
Back to top
View user's profile Send private message
BitJam
Advocate
Advocate


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

PostPosted: Fri Dec 17, 2010 3:17 am    Post subject: Reply with quote

I think tmux is easier to use than screen. Doe the same thing.
Back to top
View user's profile Send private message
SnackMasterX
Apprentice
Apprentice


Joined: 26 Jan 2006
Posts: 231

PostPosted: Tue Feb 01, 2011 1:08 pm    Post subject: Reply with quote

So I'm in a bit of a bind, my X session is messed up and I am running dd_rescue and I can see it in the processes, will either one of those allow me to remotely detatch all terminal sessions and take control of any of them?
Back to top
View user's profile Send private message
SnackMasterX
Apprentice
Apprentice


Joined: 26 Jan 2006
Posts: 231

PostPosted: Tue Feb 01, 2011 1:09 pm    Post subject: Reply with quote

On a side note I hadn't installed the program previously, I just merged it a couple minutes ago and the dd_rescue process has been open and running for about a day now (not sure if that complicates things)
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54244
Location: 56N 3W

PostPosted: Tue Feb 01, 2011 10:35 pm    Post subject: Reply with quote

SnackMasterX,

You can only detach and resume things that were started inside screen.

However, for dd_rescue, it keeps a log of what its done and uses the log to pick up where it left off if you restart it, using the same command as it was started with originally. That is, unless you sent the log to /dev/null
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
SnackMasterX
Apprentice
Apprentice


Joined: 26 Jan 2006
Posts: 231

PostPosted: Wed Feb 02, 2011 5:06 am    Post subject: Reply with quote

Well I ended up losing my state and i reran the same command but it just started from scratch :-(

So far the new dd_rescue (within tmux this time :3) has been running for about 16 hours and copied a whole 1.6 gigs so far! Ohh and over 2000 errors... :-\

Thanks for the help, sorry for the rant/off topic.
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