Package Search
 
Members: 353 | Topics: 767 | Posts: 3211
We welcome our newest member: ClintBarton
Info
» You aren't logged in, login or registerOnline: No members and 13 guests | Time: 17:11
Grub-Menu with multilanguage support
paldo Support Forum    paldo    General Discussion
Reply Reply   Subscribe Topic Subscribe Topic
6 posts found.
 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
Profile   Private Message   E-Mail
Created: 2007-05-16 12:21
Highlight selected Text   Edit   Delete   Quote Reply
 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 ...
Profile   Private Message   E-Mail
Created: 2007-05-16 13:10
Highlight selected Text   Edit   Delete   Quote Reply
 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 ...
Profile   Private Message   E-Mail
Created: 2007-05-16 13:56
Highlight selected Text   Edit   Delete   Quote Reply
 /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:

Code[In neuem Fenster öffnen]
gunzip -c *.igz | cpio -H newc -idv


maybe we can add it to the livecd.
Profile   Private Message   E-Mail
Created: 2007-05-19 14:45 | Modified: 2007-05-19 14:56 by Amnon82
Highlight selected Text   Edit   Delete   Quote Reply
 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.
Profile   Private Message   Web
Created: 2007-06-17 22:27
Highlight selected Text   Edit   Delete   Quote Reply
 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 ...
Profile   Private Message   E-Mail
Created: 2007-06-18 22:56
Highlight selected Text   Edit   Delete   Quote Reply
Subscribe Topic Subscribe Topic
powered by bitron board 1.23a