public inbox for blinux-list@redhat.com
 help / color / mirror / Atom feed
From: Lee Maschmeyer <Lee_Maschmeyer@wayne.edu>
To: blinux-list@redhat.com
Subject: Lee's Impeccable Guide to Consoles
Date: Fri, 9 May 2003 10:52:56 -0400	[thread overview]
Message-ID: <20030509145256.GA1336@wayne.edu> (raw)

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




             reply	other threads:[~ UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
 Lee Maschmeyer [this message]
 ` Dave Mielke

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=20030509145256.GA1336@wayne.edu \
    --to=lee_maschmeyer@wayne.edu \
    --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).