From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost.localdomain (int-mx1.corp.redhat.com [172.16.52.254]) by listman.redhat.com (Postfix) with ESMTP id EA17F3EAED for ; Sat, 23 Mar 2002 12:22:24 -0500 (EST) Received: from lacrosse.corp.redhat.com (IDENT:root@lacrosse.corp.redhat.com [172.16.52.154]) by localhost.localdomain (8.11.6/8.11.6) with ESMTP id g2NHMOm18656 for ; Sat, 23 Mar 2002 12:22:24 -0500 Received: (from mail@localhost) by lacrosse.corp.redhat.com (8.11.6/8.9.3) id g2NHMO426652 for blinux-list@listman.redhat.com; Sat, 23 Mar 2002 12:22:24 -0500 Received: from localhost.localdomain (int-mx1.corp.redhat.com [172.16.52.254]) by lacrosse.corp.redhat.com (8.11.6/8.9.3) with ESMTP id g2NHMOi26648 for ; Sat, 23 Mar 2002 12:22:24 -0500 Received: from mx1.redhat.com (mx1.redhat.com [172.16.48.31]) by localhost.localdomain (8.11.6/8.11.6) with SMTP id g2NHMOm18652 for ; Sat, 23 Mar 2002 12:22:24 -0500 Received: from mielke.cc (IDENT:root@CPE00608c86a77d.cpe.net.cable.rogers.com [24.157.76.7]) by mx1.redhat.com (8.11.6/8.11.6) with SMTP id g2NHKCu28050 for ; Sat, 23 Mar 2002 12:20:12 -0500 Received: from dave.private.mielke.cc (root@dave.private.mielke.cc [192.168.0.2]) by mielke.cc (8.11.6/8.11.6) with ESMTP id g2NHMLH04975 for ; Sat, 23 Mar 2002 12:22:21 -0500 Received: from localhost (dave@localhost) by dave.private.mielke.cc (8.9.3/8.9.3) with ESMTP id MAA01644 for ; Sat, 23 Mar 2002 12:20:50 -0500 X-Authentication-Warning: dave.private.mielke.cc: dave owned process doing -bs Date: Sat, 23 Mar 2002 12:20:49 -0500 (EST) From: Dave Mielke To: Subject: Re: Screen Command vs. Virtual Consoles In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Loop: blinux-list@redhat.com Sender: blinux-list-admin@redhat.com Errors-To: blinux-list-admin@redhat.com X-BeenThere: blinux-list@redhat.com X-Mailman-Version: 2.0.1 Precedence: bulk Reply-To: blinux-list@redhat.com List-Help: List-Post: List-Subscribe: , List-Id: Linux for blind general discussion List-Unsubscribe: , List-Archive: [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