* Lee's Impeccable Guide to Consoles
@ Lee Maschmeyer
` Dave Mielke
0 siblings, 1 reply; 2+ messages in thread
From: Lee Maschmeyer @ UTC (permalink / raw)
To: blinux-list
Hi all,
If you believe that subject you'll probably believe anything, but I
think I have muddled through to a reasonable understanding of console
setup. Since it was kind of hard for me, I thought perhaps others might
benefit from my experience. My thanks to Barbara Wagreich who gave me
the most important file changes.
All this applies to Red Hat 8:
The first thing to realize is that the word "alt" applies to the LEFT
alt key. The right alt key is called AltGr. This is true even in
English. (I used to think AltGr had something to do with German!)
By default, there are keys assigned to switch among 24 consoles; this
can be verified with dumpkeys -f. They can't all be used yet, but keys
are assigned. Consoles 1-12 are assigned Alt+F1-Alt+F12; consoles 13-24
are AltGr+F1-AltGr+F12. Alt+RightArrow switches to the next higher
console, and Alt+LeftArrow to the next lower. Finally, there's a
function called Last_Console which flipflops between the two most
recently viewed consoles. This one is assigned to a key (code 84) I
don't seem to have on my keyboard, so I had to assign it by editing my
keymap file.
Now, to make these consoles usable, I had to edit two files. In
/etc/inittab there is a series of lines the last one of which is:
6:2345:respawn:/sbin/mingetty tty6
These lines spawn 6 consoles. I extended the series for consoles 7-24,
so the last line is:
24:2345:respawn:/sbin/mingetty tty24
Also, in /etc/rc.d/rc.sysinit, the font must be loaded into the new
consoles; otherwise lots of strange characters appear in man pages and
other files. I extended the line:
for i in 2 3 4 5 6; do
to:
for i in 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24;
do
If anybody wants to try doing this with programming something like
2-24, be my guest. I had trouble editing one or both of these files and
hosed my system to the point my boss had to bail me out, so I'm not
touching anything. <Grin>
The frosting on the cake is to be able to log on as root from any of
these consoles. The file /etc/securetty lists consoles that are safe for
root's use. As distributed this allows root on tty1-tty11. I added lites
for tty12-tty24. I didn't fool with the range vc/1-vc/11. I don't know
what these are, but adding just the tty lines works for me.
I've also changed (again at Barbara's suggestion) my PS1 to include the
console device number. By making the prompt bold I can use brltty's
UpToPreviousAttribute command to good effect. In case it's of interest,
the lines in .bashrc are:
BOLD=`tput smso`;export BOLD
OFFBOLD=`tput rmso`;export OFFBOLD
PS1='$BOLD$?`tty | cut -b5-`($SHLVL)\$$OFFBOLD ';export PS1 # Last RC,\
current console, current shell level
Now to the things I don't have:
I don't have a reliable way to make the screen larger. I'm used to that
primitive operating $y$tem that will do so many more things (albeit
slowly). I regularly have lines upward of 200 characters long and
screens with more than 40 lines. I haven't found anything on Linux to do
this. The resizecons utility will allow me to get more lines on the
screen, but every time I start a new shell the screen goes back to 25
lines. Also, when logging into a new console the prompts are messed up
until (presumably bash) resets the number of lines.
I can paste between consoles using brltty, but the lack of feedback when
blocking the text to be copied makes things a tad less than ideal.
Though I hope this is useful, I would as always be interested in
suggestions on how to improve all this. So, TIA for both accolades and
flames :-),
Lee
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Lee's Impeccable Guide to Consoles
Lee's Impeccable Guide to Consoles Lee Maschmeyer
@ ` Dave Mielke
0 siblings, 0 replies; 2+ messages in thread
From: Dave Mielke @ UTC (permalink / raw)
To: blinux-list
[quoted lines by Lee Maschmeyer on May 9, 2003, at 10:52]
Hi:
>there's a
>function called Last_Console which flipflops between the two most
>recently viewed consoles. This one is assigned to a key (code 84) I
>don't seem to have on my keyboard, so I had to assign it by editing my
>keymap file.
Key code 84 is an odd key code for the System Request (SysRq) key which the
BIOS generates when either alt (left alt) or altgr (right alt) is pressed
together with the Print Screen (PrintScrn) key (which normally is key code 99).
The Linux kernel I'm currently using, 2.4.18, no longer seems to pass this
special BIOS quirk through. The theoretical addition to the key map
to get Last_Console back is:
alt keycode 99 = Last_Console
altgr keycode 99 = Last_Console
Even this doesn't work, though. The keyboard really does send out a totally
different scan code for the Print Screen key when either of the alt keys is
pressed, and, for whatever reason, Linux no longer seems to be handling that
scan code.
>If anybody wants to try doing this with programming something like
>2-24, be my guest. I had trouble editing one or both of these files and
>hosed my system to the point my boss had to bail me out, so I'm not
>touching anything. <Grin>
The loop as supplied by RedHat is:
for i in 2 3 4 5 6; do
> /dev/tty$i
done
The general loop probably should be:
for device in /dev/tty[0-9]*; do
> $device
done
>I didn't fool with the range vc/1-vc/11. I don't know
>what these are, but adding just the tty lines works for me.
The vc/ devices are for the same ttys but when devfs is being used. It'd be
correct to add the extra lines for vc/12-24 as well.
>but every time I start a new shell the screen goes back to 25
>lines.
That probably means that you have a .bashrc file which sets the environment
variable LINES to 25. That file shouldn't be doing this sort of thing.
>I can paste between consoles using brltty, but the lack of feedback when
>blocking the text to be copied makes things a tad less than ideal.
BRLTTY generates tone sequences on the PC speaker when blocking the text.
Check (in BRLTTY's preferences menu) to see if "Alert Tunes" is turned on.
--
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/ | http://mielke.cc/bible/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~ UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
Lee's Impeccable Guide to Consoles Lee Maschmeyer
` Dave Mielke
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).