|
Packit Service |
50ad14 |
# Consoles to be initialized
|
|
Packit Service |
50ad14 |
# INITTY=/dev/tty[1-9]*
|
|
Packit Service |
50ad14 |
INITTY=/dev/tty1
|
|
Packit Service |
50ad14 |
|
|
Packit Service |
50ad14 |
# set numlock and set metabit mode on all virtual consoles
|
|
Packit Service |
50ad14 |
for tty in $INITTY
|
|
Packit Service |
50ad14 |
do
|
|
Packit Service |
50ad14 |
setleds -D +num < $tty > /dev/null
|
|
Packit Service |
50ad14 |
setmetamode metabit < /dev/tty$t > /dev/null
|
|
Packit Service |
50ad14 |
done
|
|
Packit Service |
50ad14 |
|
|
Packit Service |
50ad14 |
# Cyrillic keyboard/console
|
|
Packit Service |
50ad14 |
setfont Cyr_a8x16 -m koi2alt
|
|
Packit Service |
50ad14 |
loadkeys ru
|
|
Packit Service |
50ad14 |
|
|
Packit Service |
50ad14 |
# or: Latin1 keyboard/console
|
|
Packit Service |
50ad14 |
setfont lat1-16 -m trivial
|
|
Packit Service |
50ad14 |
loadkeys -d
|
|
Packit Service |
50ad14 |
|
|
Packit Service |
50ad14 |
# enable mapping
|
|
Packit Service |
50ad14 |
for tty in $INITTY
|
|
Packit Service |
50ad14 |
do
|
|
Packit Service |
50ad14 |
echo -n -e "\\033(K" > $tty
|
|
Packit Service |
50ad14 |
done
|
|
Packit Service |
50ad14 |
|
|
Packit Service |
50ad14 |
# Opening a tty for reading or writing will create the corresponding
|
|
Packit Service |
50ad14 |
# console. So, probably you want to do the above not on all /dev/tty*
|
|
Packit Service |
50ad14 |
# but only on those where you start a getty. If the remaining ones
|
|
Packit Service |
50ad14 |
# are opened using "open -s -l bash", then a "setleds -D +num" or so
|
|
Packit Service |
50ad14 |
# in .profile will take care of the newly opened console.
|
|
Packit Service |
50ad14 |
|
|
Packit Service |
50ad14 |
# Let alt-uparrow (given at the shell prompt) create a new virtual console
|
|
Packit Service |
50ad14 |
#
|
|
Packit Service |
50ad14 |
loadkeys << EOF
|
|
Packit Service |
50ad14 |
alt keycode 103 = F100
|
|
Packit Service |
50ad14 |
string F100 = "open -l -s bash\n"
|
|
Packit Service |
50ad14 |
EOF
|
|
Packit Service |
50ad14 |
#
|
|
Packit Service |
50ad14 |
# Let alt-uparrow (anytime) create a new virtual console
|
|
Packit Service |
50ad14 |
# (watch out for security aspects!)
|
|
Packit Service |
50ad14 |
#
|
|
Packit Service |
50ad14 |
spawn_console& # start a deamon that listens to the keyboard
|
|
Packit Service |
50ad14 |
loadkeys << EOF
|
|
Packit Service |
50ad14 |
alt keycode 103 = Spawn_Console
|
|
Packit Service |
50ad14 |
EOF
|