From: gobo72 Date: Mon, 22 Aug 2011 01:18:00 +0000 (+0000) Subject: Ajouté support automatique pour clavier accentué (ou autre) sous X.org X-Git-Url: http://gitweb.hugovil.com/?a=commitdiff_plain;h=9d1f28295ec1c295329a0a9dd319ac86dbad8015;p=hvlinux.git Ajouté support automatique pour clavier accentué (ou autre) sous X.org --- diff --git a/stage4/configure-xorg b/stage4/configure-xorg index 0bbb39c..75b2d53 100755 --- a/stage4/configure-xorg +++ b/stage4/configure-xorg @@ -123,89 +123,37 @@ if [ "x${INST_TYPE}" = "xltsp-server" ]; then chmod 444 /etc/X11/xdm/Xaccess fi -# Many package are still trying to find X in /usr/X11R6. -# Until then, you can create a symbolic link to satisfy the /usr/X11R6 -# requirement so that you won't be inconvenienced with a package build -# failure due to this known issue. -#ln -scfT /usr /usr/X11R6 - -cat > /etc/X11/xorg.conf.template << "EOF" +# Header +cat > /etc/X11/xorg.conf << "EOF" # xorg.conf -# -# ********************************************************************** -# Input devices. -# ********************************************************************** -Section "InputDevice" - Identifier "Keyboard1" - Driver "keyboard" - Option "XkbRules" "xfree86" - Option "XkbModel" "pc105" - Option "XkbLayout" "_XF86_KEYBOARD_LAYOUT_" - Option "XkbVariant" "_XF86_KEYBOARD_VARIANT_" - Option "XkbOptions" "_XF86_KEYBOARD_OPTIONS_" - Option "AutoRepeat" "500 30" -EndSection -Section "InputDevice" - Identifier "Mouse1" - Driver "mouse" - Option "Emulate3Buttons" - Option "Protocol" "auto" - Option "Device" "/dev/input/mice" - Option "ZAxisMapping" "4 5" - Option "Buttons" "5" -EndSection +EOF -# ********************************************************************** -# Monitor section -# No need to specify VertRefresh and HorizSync, as DDC2 data will -# be used (if monitor is recent and supports it). -# ********************************************************************** -Section "Monitor" - Identifier "Monitor1" - VendorName "Unknown" - ModelName "Unknown" +# Keyboard section, if applicable +if [ -n ${XORG_KEYBOARD_LAYOUT} ]; then + cat >> /etc/X11/xorg.conf << "EOF" +Section "InputClass" + Identifier "Keyboard Defaults" + MatchIsKeyboard "yes" +EOF + echo "Option \"XkbLayout\" \"${XORG_KEYBOARD_LAYOUT}\"" >> /etc/X11/xorg.conf + if [ -n ${XORG_KEYBOARD_VARIANT} ]; then + echo "Option \"XkbVariant\" \"${XORG_KEYBOARD_VARIANT}\"" >> /etc/X11/xorg.conf + fi + cat >> /etc/X11/xorg.conf << "EOF" EndSection -# ********************************************************************** -# Device (video card) section -# ********************************************************************** +EOF +fi + +# Video driver section +cat >> /etc/X11/xorg.conf << "EOF" Section "Device" Identifier "VideoCard1" Driver "_VIDEO_CARD_DRIVER_" EndSection - -# ********************************************************************** -# Screen section -# ********************************************************************** -Section "Screen" - Identifier "Screen1" - Device "VideoCard1" - Monitor "Monitor1" - DefaultColorDepth 24 - Subsection "Display" - Depth 24 - Modes "1024x768" "800x600" - ViewPort 0 0 - EndSubsection -EndSection - -# ********************************************************************** -# Layout(s) section -# ********************************************************************** -Section "ServerLayout" - Identifier "Default" - Screen "Screen1" - InputDevice "Mouse1" "CorePointer" - InputDevice "Keyboard1" "CoreKeyboard" -EndSection - EOF -sed -i -e "s!_HV_FONTS_PATH_!${HV_FONTS_PATH}!g" /etc/X11/xorg.conf.template -sed -i -e "s!_VIDEO_CARD_DRIVER_!${XORG_VIDEO_DRIVER}!g" /etc/X11/xorg.conf.template -sed -i -e "s!_XF86_KEYBOARD_LAYOUT_!${HV_XF86_KEYBOARD_LAYOUT}!g" /etc/X11/xorg.conf.template -sed -i -e "s!_XF86_KEYBOARD_VARIANT_!${HV_XF86_KEYBOARD_VARIANT}!g" /etc/X11/xorg.conf.template -sed -i -e "s!_XF86_KEYBOARD_OPTIONS_!${HV_XF86_KEYBOARD_OPTIONS}!g" /etc/X11/xorg.conf.template +sed -i -e "s!_VIDEO_CARD_DRIVER_!${XORG_VIDEO_DRIVER}!g" /etc/X11/xorg.conf exit $? diff --git a/stage4/hv-install-1 b/stage4/hv-install-1 index c19d7ce..e96602e 100755 --- a/stage4/hv-install-1 +++ b/stage4/hv-install-1 @@ -3,11 +3,7 @@ source ../functions/main source /etc/profile -if [ "x${USER}" != "xroot" ]; then - echo "You must be the superuser to install hvlinux." - exit 1 -fi - +check_for_root_user init_log_file LFS_PKG_DIR_ORIG=${LFS_PKG_DIR}