Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Login VIA SSH to existing session.
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
waxed
n00b
n00b


Joined: 14 Dec 2003
Posts: 22

PostPosted: Mon Dec 15, 2003 6:39 pm    Post subject: Login VIA SSH to existing session. Reply with quote

I am in the process of emerging my system at home. I started SSH so i am able to login to the system. Is there a way to login to the session that is running on the box? I.E. i want to be able to watch the emerge install process via a SSH terminal. :?: am i making scence here? lol
Back to top
View user's profile Send private message
RedDawn
Guru
Guru


Joined: 22 Sep 2003
Posts: 368
Location: Los Angeles, California

PostPosted: Mon Dec 15, 2003 6:41 pm    Post subject: Umm...i dont know! Reply with quote

I think this is a dupe i found something similar to this sometime ago in the forums it mentioned something about using screen and backgrounding the session so that when u logged out and logged backed in it would be right there were u left off! or u could just start ssh and emerge from there :?
Back to top
View user's profile Send private message
waxed
n00b
n00b


Joined: 14 Dec 2003
Posts: 22

PostPosted: Mon Dec 15, 2003 6:53 pm    Post subject: Re: Umm...i dont know! Reply with quote

FearPasion710 wrote:
I think this is a dupe i found something similar to this sometime ago in the forums it mentioned something about using screen and backgrounding the session so that when u logged out and logged backed in it would be right there were u left off! or u could just start ssh and emerge from there :?


well i already have emerge running @ home. I would like to be able to login to the system and see what is going on and to show some friends here at work.
Back to top
View user's profile Send private message
waxed
n00b
n00b


Joined: 14 Dec 2003
Posts: 22

PostPosted: Mon Dec 15, 2003 6:58 pm    Post subject: Reply with quote

cdimage / # screen --help
Use: screen [-opts] [cmd [args]]
or: screen -r [host.tty]

Options:
-a Force all capabilities into each window's termcap.
-A -[r|R] Adapt all windows to the new display width & height.
-c file Read configuration file instead of '.screenrc'.
-d (-r) Detach the elsewhere running screen (and reattach here).
-dmS name Start as daemon: Screen session in detached mode.
-D (-r) Detach and logout remote (and reattach here).
-D -RR Do whatever is needed to get a screen session.
-e xy Change command characters.
-f Flow control on, -fn = off, -fa = auto.
-h lines Set the size of the scrollback history buffer.
-i Interrupt output sooner when flow control is on.
-l Login mode on (update /var/run/utmp), -ln = off.
-list or -ls. Do nothing, just list our SockDir.
-L Turn on output logging.
-m ignore $STY variable, do create a new screen session.
-O Choose optimal output rather than exact vt100 emulation.
-p window Preselect the named window if it exists.
-q Quiet startup. Exits with non-zero return code if unsuccessful.
-r Reattach to a detached screen process.
-R Reattach if possible, otherwise start a new session.
-s shell Shell to execute rather than $SHELL.
-S sockname Name this session <pid>.sockname instead of <pid>.<tty>.<host>.
-t title Set title. (window's name).
-T term Use term as $TERM for windows, rather than "screen".
-U Tell screen to use UTF-8 encoding.
-v Print "Screen version 3.09.15 (FAU) 13-Mar-03".
-wipe Do nothing, just clean up SockDir.
-x Attach to a not detached screen. (Multi display mode).
-X Execute <cmd> as a screen command in the specified session.
cdimage / # screen -d
There is no screen to be detached.
cdimage / # screen -D
There is no screen to be detached.
cdimage / #
Back to top
View user's profile Send private message
Jerri
Guru
Guru


Joined: 03 Apr 2003
Posts: 353

PostPosted: Mon Dec 15, 2003 8:57 pm    Post subject: Reply with quote

If you want to watch an emerge from a remote terminal, you have to start a screen session (you can do this from your computer at home, or remote comp after logging in through ssh),
type 'screen' at the terminal.
then start your emerge, or whatever...
If you want to log out while compiling your program, you have to detach screen.
To do this, type ctrl-a, then hit 'd'

You can now log out of system and have process continue. If you would like to reattach screen, type screen -ls (this will list all the running screen's)

then type screen -r screen.to.attach

eg:
Code:

[jer@leadnut][~]: screen -ls
There is a screen on:
        8233.pts-1.leadnut      (Detached)
1 Socket in /var/run/screen/S-jer.

[jer@leadnut][~]: screen -r 8233.pts-1.leadnut


If you want multiple attachments, replace -r with -x
read the man page to find out more.

Note, you must have a screen session running inorder to detach and log out.. emerge has to be running inside that screen session, so that you can reattach from a remote terminal.
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20067

PostPosted: Wed Aug 11, 2004 9:09 pm    Post subject: Reply with quote

https://forums.gentoo.org/viewtopic.php?t=55331&highlight=emerge+remote+session
_________________
Quis separabit? Quo animo?
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