From: Dave Mielke <dave@mielke.cc>
To: <blinux-list@redhat.com>
Subject: Re: Screen Command vs. Virtual Consoles
Date: Sat, 23 Mar 2002 12:20:49 -0500 (EST) [thread overview]
Message-ID: <Pine.LNX.4.30.0203231134010.1009-100000@dave.private.mielke.cc> (raw)
In-Reply-To: <Pine.LNX.4.33.0203231003400.7287-100000@localhost.localdomain>
[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
next prev parent reply other threads:[~ UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
John J. Boyer
` Mike Gorse
` Cheryl Homiak
` Dave Mielke [this message]
` Cheryl Homiak
` Dave Mielke
` Janina Sajka
` Mario Lang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.30.0203231134010.1009-100000@dave.private.mielke.cc \
--to=dave@mielke.cc \
--cc=blinux-list@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).