Ajouté support automatique pour clavier accentué (ou autre) sous X.org
authorgobo72 <gobo72@364a67c3-989e-7be9-548d-dae8560ea662>
Mon, 22 Aug 2011 01:18:00 +0000 (01:18 +0000)
committergobo72 <gobo72@364a67c3-989e-7be9-548d-dae8560ea662>
Mon, 22 Aug 2011 01:18:00 +0000 (01:18 +0000)
stage4/configure-xorg
stage4/hv-install-1

index 0bbb39c..75b2d53 100755 (executable)
@@ -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 $?
index c19d7ce..e96602e 100755 (executable)
@@ -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}