LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Getting multiple consoles on single login (https://www.linuxquestions.org/questions/linux-general-1/getting-multiple-consoles-on-single-login-125705/)

Mork 12-14-2003 07:19 AM

Getting multiple consoles on single login
 
I like doing some work using console. Using Alt+F to switch between consoles is pretty convenient, however this means you have to login to every console separately. Is there a way to login to several consoles at once?

fatgod 12-14-2003 07:39 AM

perhaps you would like to use screen...

http://www.gnu.org/software/screen/

mac_phil 12-14-2003 12:00 PM

Screen does that, and much more. I usually have about eight console sessions and only one login.

You can also 'detach' all the sessions and they'll run in the background, even if your connection dies, your X-Server dies, or whatever. You can SSH into the box from anywhere and 'reattach' sessions, giving you all of those console sessions. They've been running, collecting output, whatever it is they would have done if you'd left them running in a regular console.

Screen is amazing.

The docs are a bit confusing. To start screen, 'screen'. That gives you Window #0. To open another window, CTRL-C. To switch windows, CTRL-*, where * is the window number. To see a list of all windows, CTRL-". To detech, CTRL-D. To reattach in a future login, do screen -r.

Mork 12-14-2003 03:28 PM

Thanks! I think screen will do what I need (perhaps a bit overkill for my simple needs though). I'll go and play now.

mac_phil 12-14-2003 05:11 PM

Sorry, I forgot to mention that all those commands must be prefaced by CTRL-A. That puts screen in command mode.

e.g., CTRL-A C to open a new window (don't need to hold control when you press C, but you can.)

fatgod 12-15-2003 04:05 AM

I use emacs on the command line so I changed CTRL-A to CTRL-P so I still can use CRTL-A to get to the beginning of a line while using screen,to do this you can add:

escape ^pp

to the top of /etc/screenrc.

mac_phil 12-15-2003 12:03 PM

I did something similar, but for different reasons. I hate meta keys so I mapped F1-F10 to CTRL-A 1, CTRL-A 2, etc.

This is very easily done in .screenrc in your home directory. There are examples in that file to look at.

bouadie 06-02-2004 02:21 AM

hi, guys
i am very new to screen program, i would appreciate any help to get it running.
i am trying to user screen program with either telnet or ssh to run commands without disconnecting from my eth0
when i try "screen" command and /sbin/ifconfig eth0 down , i get disconnected from my session , i think when unsing screen i should stay connected .
i would love to know the procedures how to get it running and working, when i type screen it only creates .screen and i do not seen .screenrc .
by the way , i am using redhat 9.

thanks to everybody.


All times are GMT -5. The time now is 08:13 AM.