Re: Simple XF4 question: switch to TTY


Subject: Re: Simple XF4 question: switch to TTY
From: Patrick Callahan (pac1@tiac.net)
Date: Sun Nov 11 2001 - 20:59:04 MST


On Sunday 11 November 2001 09:16, you wrote:
> if you want to add more virtual terminals edit the /etc/inittab file.
> there should be a few lines that looks something like:
>
> 1:2345:respawn:/sbin/mingetty tty1
> 2:2345:respawn:/sbin/mingetty tty2
> 3:2345:respawn:/sbin/mingetty tty3
> 4:2345:respawn:/sbin/mingetty tty4
> 5:2345:respawn:/sbin/mingetty tty5
> 6:2345:respawn:/sbin/mingetty tty6
>
> this is to define the first six virtual terminals. x is run on the next
> availiable terminal. to add another virtual terminal just add the
> following line.
>
> 7:2345:respawn:/sbin/mingetty tty7
>
> hope this is of some help.
>
> elliot

Actually it is of great help.

The mingetty processes run as a result of the init process and man inittab
gives a lot of information about this. One of the items under the heading
ENVIRONMENT is:

       CONSOLE
              The system console. This is really inherited from the kernel;
however if it is not set init will set it to /dev/console by default.

and under SIGNALS is:
       SIGWINCH
            The kernel sends this signal when the KeyboardSignal key is hit.
 It activates the kbrequest action.

Is it a SIGWINCH signal that causes the switch between consoles?

In the man page for inittab, I found the following:
       kbrequestThe process will be executed when init receives a signal
from the keyboard handler that a special key combination was pressed on the
console keyboard.

              The documentation for this function is not complete yet; more
documentation can be found in the kbd-x.xx packages (most recent was
kbd-0.94 at the time of this writing). Basically you want to map some
keyboard combination to the "KeyboardSignal" action. For example, to map
Alt-Uparrow for this purpose use the following in your keymaps file: alt
keycode 103 = KeyboardSignal

The list of players grows:

mingetty
init (which starts the mingetty processes)
the kernel (which part?)
kbd

Remember that we're looking for the actual code that's involved in processing
the ctrl-alt f1 to f7 keys.

Are we getting close yet?

-Pat



This archive was generated by hypermail 2a24 : Sun Nov 11 2001 - 21:10:53 MST