/usr/bin/unicode_start is in console-tools 1:0.2.3dbs-65.1ubuntu2.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
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 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | #!/bin/sh
# start unicode mode
if [ ! -e /proc/self/fd/0 ] ; then
echo "Won't set unicode mode: Can't determine console type;" >&2
echo " Please ensure that /proc is mounted." >&2
exit 1
fi
readlink /proc/self/fd/0 | grep -q -e /dev/vc -e '/dev/tty[^p]' -e /dev/console
if [ $? -eq 1 ]; then
echo "Won't set unicode mode: not a VT." >&2
exit 1
fi
if [ -n "$previous" ] && [ -n "$runlevel" ] || [ "$runlevel" = "S" ]; then
RUN_FROM_INIT="yes"
fi
if /usr/bin/vt-is-UTF8 --quiet && [ "$RUN_FROM_INIT" != "yes" ]; then
echo "unicode_start: Already in UTF8 mode" >&2
exit 0
fi
# We want kbd to be in unicode mode before we run loadkeys;
# otherwise confusion over keysyms reigns.
kbd_mode -u
dumpkeys | loadkeys --unicode > /dev/null
case $# in
2)
consolechars --font=$1 --sfm=$2
;;
1)
consolechars --font=$1
;;
0)
;;
*)
echo "usage: unicode_start [font [unicode map]]"
;;
esac
# set DEVICE_PREFIX depending on devfs/udev
if [ -d /dev/vc ]; then
DEVICE_PREFIX="/dev/vc/"
else
DEVICE_PREFIX="/dev/tty"
fi
NUM=`fgconsole --next-available`
NUM=`expr ${NUM} - 1 `
# This needs a better fix, but because unicode_{start,stop} are called
# before getty starts the other consoles, if only one console set, then
# set for the first 6 VTs, since these are normally started by inittab
[ $NUM -eq 1 ] && NUM=6
for vc in `seq 1 ${NUM}`
do
# Since 1.2.1 - for older kernels, use: echo -n -e '\033%8'
/bin/echo -n -e '\033%G' > ${DEVICE_PREFIX}${vc}
done
|