* Screen Command vs. Virtual Consoles
@ John J. Boyer
` Mike Gorse
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: John J. Boyer @ UTC (permalink / raw)
To: blinux-list
Hello,
Is there any advantage of using the screen command over using virtual
consoles? How do I increase the number of virtual consoles on my Redhat
7.1 system from 6 to 12?
How does one paste between virtual consoles? I could use the cut-and-paste
feature of BRLTTY, but it seems toi me that a similar feature should be
available using virtual consoles.
Thanks.
John
--
Computers to Help People, Inc.
http://www.chpi.org
825 East Johnson; Madison, WI 53703
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Screen Command vs. Virtual Consoles
Screen Command vs. Virtual Consoles John J. Boyer
@ ` Mike Gorse
` Cheryl Homiak
` Dave Mielke
` Mario Lang
2 siblings, 1 reply; 8+ messages in thread
From: Mike Gorse @ UTC (permalink / raw)
To: blinux-list
On Sat, 23 Mar 2002, John J. Boyer wrote:
> Hello,
> Is there any advantage of using the screen command over using virtual
> consoles? How do I increase the number of virtual consoles on my Redhat
> 7.1 system from 6 to 12?
You should have lines similar to the following in /etc/inittab:
5:12345:respawn:/sbin/agetty -f /etc/issue.ansi 38400 vc/5 linux
6:12345:respawn:/sbin/agetty -f /etc/issue.ansi 38400 vc/6 linux
It would probably be sufficient to simply add more lines similar to these
but with the appropriate numbers, although I have never tried this.
> How does one paste between virtual consoles? I could use the cut-and-paste
> feature of BRLTTY, but it seems toi me that a similar feature should be
> available using virtual consoles.
I believe gpm allows one to do this with a mouse. I am not sure that it
can be done with the keyboard.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Screen Command vs. Virtual Consoles
Screen Command vs. Virtual Consoles John J. Boyer
` Mike Gorse
@ ` Dave Mielke
` Cheryl Homiak
` Janina Sajka
` Mario Lang
2 siblings, 2 replies; 8+ messages in thread
From: Dave Mielke @ UTC (permalink / raw)
To: blinux-list
[quoted lines by John J. Boyer on March 23, 2002, at 10:08]
>Is there any advantage of using the screen command over using virtual
>consoles?
Certain commands don't work because they use ioctls which only work on the
console itself. Curses-based applications are somewhat less efficient since the
full capabilities of the Linux console aren't available. Applications which
need to put the keyboard into raw mode don't work. While these limitations are
real, they don't tend to strike very often.
>How do I increase the number of virtual consoles on my Redhat
>7.1 system from 6 to 12?
First: Make sure that all of the necessary devices exist. There should be one
/dev/tty device for each virtual console, e.g. /dev/tty1 is used for the first
virtual console, and /dev/tty12 is used for the twelfth. If you need to create
one, do so as follows (using virtual console 9 as an example):
mknod -m=u=rw,go- /dev/tty9 c 4 9
The "mknod" command creates a special file. The "-m" option sets the file
permission bits; "u=rw" gives read and write access to the owner (root), and
"go-" removes all access from group and others. The "c" says to create a
"character special" device, which tells the kernel the general nature regarding
how it's to be handled. The "4", i.e. the first number after the device type
letter, is what's called the "major number", and specifies which kernel driver
is to be used (for character special devices, 4 selects the virtual console
driver). The "9", i.e. the second number after the device type letter, is
what's called the "minor number", and specifies which actual device the special
file is pointing to.
Second: You should also make sure that another set of devices exist, i.e. the
ones for looking at the screen. Again, using virtual console 9 as an example,
create the ones which don't exist as follows:
mknod -m=u=rw,go- /dev/vcs9 c 7 9
mknod -m=u=rw,go- /dev/vcsa9 c 7 137
Note that the vcsa devices are numbered starting from 128, so 135 is used for
virtual console 9 because it's 128+9.
Third: Start a login prompt for each new virtual cnsole. You do this by adding
lines to your /etc/inittab file (again, using virtual console 9 as an example)
as follows:
9:2345:respawn:/sbin/mingetty tty9
The first field, "9", is the entry's identifier, and, by convention, should be
the virtual console number. The second field, "2345", specifies the set of run
levels wherein the entry is active. The third field, "respawn", specifies that
the entry is to be automatically reactivated when its process dies, i.e. when
the user logs out. "mingetty" is a simple login prompt manager.
After all the new entries have been added, issue the command "init q" to get
the system to notice them.
Note that the system supports 63 virtual consoles. Most key maps give access to
virtual consoles 1 through 12 via the left alt key and the twelve function
keys, and to virtual consoels 13 through 24 via the right alt key and the
twelve function keys. They also typically allow the addition of either control
key for virtual consoles 1 through 12 (to get around the fact that X takes over
the basic key combinations), but not for virtual consoles 13 through 24.
>How does one paste between virtual consoles?
There's a process called gpm which provides this capability. It's easy for a
sighted person, but not for a blind person, to use since it uses the mouse.
Note that screen also offers cut&paste as follows:
First: Enter "copy mode" by pressing ctrl-A and then pressing the left square
bracket. This will place you into a buffer (which goes quite a long way back)
containing your most recent console output. It's also a very useful mode for
just looking at previous output. If you enter this mode by accident, you can
get out of it by pressing any invalid key (e.g. a period).
Second: Use vi-like commands (h to go left, j to go down, k to go up, l to go
right, ? to search backward, etc.) to move the cursor to the first character
you wish to cut. Then press the space bar.
Third: Using the same vi-like commands, move the cursor to the last character
you wish to cut, and then press the space bar again. This will cut the block,
and then return you to your session's screen.
Fourth: To paste the block, press ctrl-A and then press the right square
bracket.
--
Dave Mielke | 2213 Fox Crescent | I believe that the Bible is the
Phone: 1-613-726-0014 | Ottawa, Ontario | Word of God. Please contact me
EMail: dave@mielke.cc | Canada K2A 1H7 | if you're concerned about Hell.
http://familyradio.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Screen Command vs. Virtual Consoles
` Mike Gorse
@ ` Cheryl Homiak
0 siblings, 0 replies; 8+ messages in thread
From: Cheryl Homiak @ UTC (permalink / raw)
To: blinux-list
Yes, I just went into emacs and blocked the lines and yanked them down below and
then went through very carefully and made sure they were all the consecutive
numbers. Twelve is no problem at all.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Screen Command vs. Virtual Consoles
` Dave Mielke
@ ` Cheryl Homiak
` Dave Mielke
` Janina Sajka
1 sibling, 1 reply; 8+ messages in thread
From: Cheryl Homiak @ UTC (permalink / raw)
To: blinux-list
Hmmm! On my debian system, only tty1 has 2345 for run levels; the rest have 23
only. Also, we are using getty rather than mingetty.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Screen Command vs. Virtual Consoles
Screen Command vs. Virtual Consoles John J. Boyer
` Mike Gorse
` Dave Mielke
@ ` Mario Lang
2 siblings, 0 replies; 8+ messages in thread
From: Mario Lang @ UTC (permalink / raw)
To: blinux-list
"John J. Boyer" <director@chpi.org> writes:
> Is there any advantage of using the screen command over using virtual
> consoles?
You can detach and later reattach to screen sessions. This allows
me to leave certain programs running, and reattach to their screen
instance when connecting later.
Imagine, your computer has a network connection reachable from the internet
say, via ssh. You login locally on your virtual terminal or whatever you use,
and start screen. Then you open several screen windows, and start programs
in there, say, e.g. Emacs, a shell session, and a lynx session.
Now you have to leave your computer, you can either leave screen running, or
for safety, detach the session using C-a d.
Now you login into that machine from somewhere else, e.g. you went to work.
You can invoke screen -r or screen -dR to reattach to the detached session.
You get the same state as you detached it. See man screen for a description
of the various detach/reattach commands.
It is also possible to have screen as your login shell, basicly giving
you a simultaneous session for each login.
Also, you can attach to a running screen session without detaching the
other terminal. Thats the option -x, and allows two
or more people on different terminals to work with the same programs. I used
this technique for a Linux course for blind students to replace
overhead alike mechanisms. They simply all attached to my screen session.
This helped extremely much.
The method even worked the other way round, I configured their logins in such a way
so that they were in a screen session everytime. So if someone had a problem,
I simply attached to his screen session, and could see what was on his screen
without having to move physically and disturb him by using his braille display.
Recently, I also discovered that you can use screen to attach to a
pty, a pseudo terminal. The only real world use currently I know of
is to connect to certain ptys created by User-mode-linux.
--
CYa,
Mario
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Screen Command vs. Virtual Consoles
` Cheryl Homiak
@ ` Dave Mielke
0 siblings, 0 replies; 8+ messages in thread
From: Dave Mielke @ UTC (permalink / raw)
To: blinux-list
[quoted lines by Cheryl Homiak on March 23, 2002, at 13:50]
>On my debian system, only tty1 has 2345 for run levels; the rest have 23
>only.
There are usually comments near the top of inittab wherein the distribution
describes its use of the various run levels. Perhaps Debian reserves run levels
4 and 5 for something special.
>Also, we are using getty rather than mingetty.
getty is the standard utility, wehreas mingetty is a very stripped down getty
which is all that's necessary for a virtual console.
--
Dave Mielke | 2213 Fox Crescent | I believe that the Bible is the
Phone: 1-613-726-0014 | Ottawa, Ontario | Word of God. Please contact me
EMail: dave@mielke.cc | Canada K2A 1H7 | if you're concerned about Hell.
http://familyradio.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Screen Command vs. Virtual Consoles
` Dave Mielke
` Cheryl Homiak
@ ` Janina Sajka
1 sibling, 0 replies; 8+ messages in thread
From: Janina Sajka @ UTC (permalink / raw)
To: blinux-list
Thanks, Dave, for this thorough explanation.I've been meaning to
investigate adding more than 12 consoles, so I realloy appreciate this
road map.
PS: Since you brought up copy and paste between consoles and for the sake
of completeness, let me point out that anyone using speakup has an
extremely simple and efficient clipboard. It works as follows:
1.) Use speakup's screen review commands to point to the first char
you want to take and press the slash key on the numeric keypad--the one
immediately above 8 and immediately to the right of numlock.
Speakup will say "mark"
2.) Do the same for the last char you want to take. Speakup will say
"cut"
3.)Do it again to go to the place you want to place that text and do
insert-slash, that is, hold down the insert/0 key on the numeric keypad
and press slash. Speakup says "pasted"
Very elegant and very very handy.
On Sat, 23 Mar 2002, Dave Mielke
wrote:
> [quoted lines by John J. Boyer on March 23, 2002, at 10:08]
>
> >Is there any advantage of using the screen command over using virtual
> >consoles?
>
> Certain commands don't work because they use ioctls which only work on the
> console itself. Curses-based applications are somewhat less efficient since the
> full capabilities of the Linux console aren't available. Applications which
> need to put the keyboard into raw mode don't work. While these limitations are
> real, they don't tend to strike very often.
>
> >How do I increase the number of virtual consoles on my Redhat
> >7.1 system from 6 to 12?
>
> First: Make sure that all of the necessary devices exist. There should be one
> /dev/tty device for each virtual console, e.g. /dev/tty1 is used for the first
> virtual console, and /dev/tty12 is used for the twelfth. If you need to create
> one, do so as follows (using virtual console 9 as an example):
>
> mknod -m=u=rw,go- /dev/tty9 c 4 9
>
> The "mknod" command creates a special file. The "-m" option sets the file
> permission bits; "u=rw" gives read and write access to the owner (root), and
> "go-" removes all access from group and others. The "c" says to create a
> "character special" device, which tells the kernel the general nature regarding
> how it's to be handled. The "4", i.e. the first number after the device type
> letter, is what's called the "major number", and specifies which kernel driver
> is to be used (for character special devices, 4 selects the virtual console
> driver). The "9", i.e. the second number after the device type letter, is
> what's called the "minor number", and specifies which actual device the special
> file is pointing to.
>
> Second: You should also make sure that another set of devices exist, i.e. the
> ones for looking at the screen. Again, using virtual console 9 as an example,
> create the ones which don't exist as follows:
>
> mknod -m=u=rw,go- /dev/vcs9 c 7 9
> mknod -m=u=rw,go- /dev/vcsa9 c 7 137
>
> Note that the vcsa devices are numbered starting from 128, so 135 is used for
> virtual console 9 because it's 128+9.
>
> Third: Start a login prompt for each new virtual cnsole. You do this by adding
> lines to your /etc/inittab file (again, using virtual console 9 as an example)
> as follows:
>
> 9:2345:respawn:/sbin/mingetty tty9
>
> The first field, "9", is the entry's identifier, and, by convention, should be
> the virtual console number. The second field, "2345", specifies the set of run
> levels wherein the entry is active. The third field, "respawn", specifies that
> the entry is to be automatically reactivated when its process dies, i.e. when
> the user logs out. "mingetty" is a simple login prompt manager.
>
> After all the new entries have been added, issue the command "init q" to get
> the system to notice them.
>
> Note that the system supports 63 virtual consoles. Most key maps give access to
> virtual consoles 1 through 12 via the left alt key and the twelve function
> keys, and to virtual consoels 13 through 24 via the right alt key and the
> twelve function keys. They also typically allow the addition of either control
> key for virtual consoles 1 through 12 (to get around the fact that X takes over
> the basic key combinations), but not for virtual consoles 13 through 24.
>
> >How does one paste between virtual consoles?
>
> There's a process called gpm which provides this capability. It's easy for a
> sighted person, but not for a blind person, to use since it uses the mouse.
>
> Note that screen also offers cut&paste as follows:
>
> First: Enter "copy mode" by pressing ctrl-A and then pressing the left square
> bracket. This will place you into a buffer (which goes quite a long way back)
> containing your most recent console output. It's also a very useful mode for
> just looking at previous output. If you enter this mode by accident, you can
> get out of it by pressing any invalid key (e.g. a period).
>
> Second: Use vi-like commands (h to go left, j to go down, k to go up, l to go
> right, ? to search backward, etc.) to move the cursor to the first character
> you wish to cut. Then press the space bar.
>
> Third: Using the same vi-like commands, move the cursor to the last character
> you wish to cut, and then press the space bar again. This will cut the block,
> and then return you to your session's screen.
>
> Fourth: To paste the block, press ctrl-A and then press the right square
> bracket.
>
>
--
Janina Sajka, Director
Technology Research and Development
Governmental Relations Group
American Foundation for the Blind (AFB)
Email: janina@afb.net Phone: (202) 408-8175
Chair, Accessibility SIG
Open Electronic Book Forum (OEBF)
http://www.openebook.org
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~ UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
Screen Command vs. Virtual Consoles John J. Boyer
` Mike Gorse
` Cheryl Homiak
` Dave Mielke
` Cheryl Homiak
` Dave Mielke
` Janina Sajka
` Mario Lang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).