LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 12-14-2003, 07:19 AM   #1
Mork
Member
 
Registered: Mar 2003
Location: Visby, Sweden
Distribution: Ubuntu 4.10
Posts: 64

Rep: Reputation: 15
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?
 
Old 12-14-2003, 07:39 AM   #2
fatgod
Member
 
Registered: Mar 2002
Location: Edinburgh, Scotland
Distribution: Suse 7.2, Gentoo 1.4, Solaris 9
Posts: 661

Rep: Reputation: 30
perhaps you would like to use screen...

http://www.gnu.org/software/screen/
 
Old 12-14-2003, 12:00 PM   #3
mac_phil
Member
 
Registered: Sep 2003
Distribution: Mandrake 10.0
Posts: 200

Rep: Reputation: 30
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.
 
Old 12-14-2003, 03:28 PM   #4
Mork
Member
 
Registered: Mar 2003
Location: Visby, Sweden
Distribution: Ubuntu 4.10
Posts: 64

Original Poster
Rep: Reputation: 15
Thanks! I think screen will do what I need (perhaps a bit overkill for my simple needs though). I'll go and play now.
 
Old 12-14-2003, 05:11 PM   #5
mac_phil
Member
 
Registered: Sep 2003
Distribution: Mandrake 10.0
Posts: 200

Rep: Reputation: 30
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.)

Last edited by mac_phil; 12-14-2003 at 05:19 PM.
 
Old 12-15-2003, 04:05 AM   #6
fatgod
Member
 
Registered: Mar 2002
Location: Edinburgh, Scotland
Distribution: Suse 7.2, Gentoo 1.4, Solaris 9
Posts: 661

Rep: Reputation: 30
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.
 
Old 12-15-2003, 12:03 PM   #7
mac_phil
Member
 
Registered: Sep 2003
Distribution: Mandrake 10.0
Posts: 200

Rep: Reputation: 30
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.
 
Old 06-02-2004, 02:21 AM   #8
bouadie
LQ Newbie
 
Registered: Jun 2004
Posts: 4

Rep: Reputation: 0
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
login managers and consoles eeades Slackware 3 08-31-2005 10:19 AM
No virtual consoles without login in KDE first!!! takism Suse/Novell 0 11-19-2004 05:20 PM
Multiple monitors - multiple text consoles (VT) mariuz Linux - General 3 09-07-2004 08:31 AM
Multiple Monitors and Virtual Consoles CIO_BlackRainbo Linux - Software 0 05-08-2004 02:20 PM
Single IP Multiple Domain H.K.Shahid Linux - Networking 1 09-06-2003 02:08 PM


All times are GMT -5. The time now is 11:20 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration