Screen Command vs. Virtual Consoles

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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





[Index of Archives]     [Linux Speakup]     [Fedora]     [Linux Kernel]     [Yosemite News]     [Big List of Linux Books]