File: sample.rc

package info (click to toggle)
console-tools 1%3A0.2.3-23.3
  • links: PTS
  • area: main
  • in suites: woody
  • size: 3,228 kB
  • ctags: 1,134
  • sloc: ansic: 12,037; sh: 9,426; yacc: 984; makefile: 380; lex: 287; perl: 127; sed: 93
file content (45 lines) | stat: -rw-r--r-- 1,152 bytes parent folder | download | duplicates (16)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# Consoles to be initialized
# INITTY=/dev/tty[1-9]*
INITTY=/dev/tty1

# set numlock and set metabit mode on all virtual consoles
for tty in $INITTY
do
	setleds -D +num < $tty > /dev/null
	setmetamode metabit < /dev/tty$t > /dev/null
done

# Cyrillic keyboard/console
setfont	Cyr_a8x16 -m koi2alt
loadkeys ru

# or: Latin1 keyboard/console
setfont lat1-16 -m trivial
loadkeys -d

# enable mapping
for tty in $INITTY
do
	echo -n -e "\\033(K" > $tty
done

# Opening a tty for reading or writing will create the corresponding
# console. So, probably you want to do the above not on all /dev/tty*
# but only on those where you start a getty. If the remaining ones
# are opened using "open -s -l bash", then a "setleds -D +num" or so
# in .profile will take care of the newly opened console.

# Let alt-uparrow (given at the shell prompt) create a new virtual console
#
loadkeys << EOF
alt keycode 103 = F100
string F100 = "open -l -s bash\n"
EOF
#
# Let alt-uparrow (anytime) create a new virtual console
# (watch out for security aspects!)
#
spawn_console&	# start a deamon that listens to the keyboard
loadkeys << EOF
alt keycode 103 = Spawn_Console
EOF