Grub-Menu with multilanguage support | |
|
|
Moderator Linux-Dude Posts: 1187 Registered: 2006-11-23 | I rewrote the grubmenu to add the languages paldo supports:
http://paldo.org/~amnon/grub/grub.tar.gz
When I start for example french I still have my german keyboard layout and english gnome. Seems this line dosn't change anything:
Code | [In neuem Fenster öffnen] | | title Paldo | French
kernel /boot/linux-2.6.21.1-paldo2 root=/dev/sda1 resume=/dev/sda3 nodmraid vga=0x317 lang=fr_FR keymap=fr-latin1
initrd /boot/initramfs-2.6.21.1-paldo2
savedefault |
|
|
|
|
|
|
Re: Grub-Menu with multilanguage support | |
|
|
Moderator Linux-Dude Posts: 1187 Registered: 2006-11-23 | maybe I've to write an init.d-script which starts after x and before gdm ... |
|
|
|
|
|
Re: Grub-Menu with multilanguage support | |
|
|
Moderator Linux-Dude Posts: 1187 Registered: 2006-11-23 | I'm writing now on a script:
Code | [In neuem Fenster öffnen] | | #!/bin/bash
### BEGIN INIT INFO
# Provides: keyboardselect
# Required-Start: $local_fs $network $syslog hotplug cups
# Required-Stop: $local_fs $network $syslog hotplug cups
# Default-Start: 5
# Default-Stop: 0 1 2 3 4 6
### END INIT INFO
#!/bin/bash
echo "Keyboard layouts:"
echo ""
echo "1 - PC105/US"
echo "2 - PC105/DE/NODEADKEYS"
echo ""
echo "What keyboard layout should it be? 1 or 2?:"
read LAYOUT
case "$LAYOUT" in
1) echo "you choosed $LAYOUT"
setxkbmap -rules xorg -model pc105 -layout us -variant "" ;;
2) echo "you choosed $LAYOUT"
setxkbmap -rules xorg -model pc105 -layout de -variant nodeadkeys ;;
*) echo "Keeping swiss keyboard layout" ;;
esac |
Now I only need a timer so the user has time to read the choices ... |
|
|
|
|
|
/etc/initrd.scripts - systemrescuecd | |
|
|
Moderator Linux-Dude Posts: 1187 Registered: 2006-11-23 | I extracted now the keyboard script of the systemrescuecd:
/etc/initrd.scripts
Code | [In neuem Fenster öffnen] | | setup_keymap() {
if [ "${DO_keymap}" ]
then
if [ ! -e /dev/vc/0 -a ! -e /dev/tty0 ]
then
DEVBIND=1
mount -o bind ${NEW_ROOT}/dev /dev
fi
[ ! -e /dev/tty0 ] && ln -s /dev/tty1 /dev/tty0
chooseKeymap
[ "${DEVBIND}" -eq '1' ] && umount /dev
if [ -e /etc/sysconfig/keyboard -a "${CDROOT}" -eq '1' ]
then
mkdir -p ${NEW_ROOT}/etc/sysconfig/
cp /etc/sysconfig/keyboard ${NEW_ROOT}/etc/sysconfig/keyboard
fi
fi
}
chooseKeymap() {
good_msg "Loading keymaps"
cat /lib/keymaps/keymapList
read -t 10 -p '<< Load keymap (Enter for default): ' keymap
case ${keymap} in
1|azerty) keymap=azerty ;;
2|be) keymap=be ;;
3|bg) keymap=bg ;;
4|br-a) keymap=br-a ;;
5|br-l) keymap=br-l ;;
6|by) keymap=by ;;
7|cf) keymap=cf ;;
8|croat) keymap=croat ;;
9|cz) keymap=cz ;;
10|de) keymap=de ;;
11|dk) keymap=dk ;;
12|dvorak) keymap=dvorak ;;
13|es) keymap=es ;;
14|et) keymap=et ;;
15|fi) keymap=fi ;;
16|fr) keymap=fr ;;
17|gr) keymap=gr ;;
18|hu) keymap=hu ;;
19|il) keymap=il ;;
20|is) keymap=is ;;
21|it) keymap=it ;;
22|jp) keymap=jp ;;
23|la) keymap=la ;;
24|lt) keymap=lt ;;
25|mk) keymap=mk ;;
26|nl) keymap=nl ;;
27|no) keymap=no ;;
28|pl) keymap=pl ;;
29|pt) keymap=pt ;;
30|ro) keymap=ro ;;
31|ru) keymap=ru ;;
32|se) keymap=se ;;
33|sg) keymap=sg ;;
34|sk-y) keymap=sk-y ;;
35|sk-z) keymap=sk-z ;;
36|slovene) keymap=slovene ;;
37|trf) keymap=trf ;;
38|trq) keymap=trq ;;
39|ua) keymap=ua ;;
40|uk) keymap=uk ;;
41|us) keymap=us ;;
42|wangbe) keymap=wangbe ;;
esac
if [ -e /lib/keymaps/${keymap}.map ]
then
good_msg "Loading the ''${keymap}'' keymap"
loadkmap < /lib/keymaps/${keymap}.map
# xkeymap=${keymap}
# echo ${keymap} | egrep -e "[0-9]+" >/dev/null 2>&1
# if [ "$?" -eq '0' ]
# then
# xkeymap=`tail -n 7 /lib/keymaps/keymapList | grep ${keymap} | sed -r "s/.*\s+${keymap}\s+([a-z-]+).*/\1/g" | egrep -v 1`
# fi
mkdir -p /etc/sysconfig
# echo "XKEYBOARD=${xkeymap}" > /etc/sysconfig/keyboard
echo "XKEYBOARD=${keymap}" > /etc/sysconfig/keyboard
elif [ "$keymap" = '' ]
then
echo
good_msg "Keeping default keymap"
else
bad_msg "Sorry, but keymap ''${keymap}'' is invalid!"
chooseKeymap
fi
} |
you can extract it yourself form this file
rescuecd.igz
using this command:
maybe we can add it to the livecd. |
|
|
|
|
|
Re: Grub-Menu with multilanguage support | |
|
|
Administrator Posts: 426 Registered: 2004-09-09 | I've added a GRUB language menu to all testing CDs, please test as soon as new CD images have been built. |
|
|
|
|
|
Re: Grub-Menu with multilanguage support | |
|
|
Moderator Linux-Dude Posts: 1187 Registered: 2006-11-23 | How does it work? Is it only on the first boot? What files did you edit. I need this information for my Installer CD. In simple: When does the keyboard layout selection get started ... |
|
|
|
|
|