X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=stage4%2Fconfigure-xorg;h=8bef873a0eb9922762cf728f74bb16b8279952f7;hb=45c5a2f834c42e914e684c784988f369118aa31b;hp=d54a806a511012a73a2ef13b77ba591c45957afd;hpb=0315072ae3bd307eee71718e1a59f923edcbdaca;p=hvlinux.git diff --git a/stage4/configure-xorg b/stage4/configure-xorg index d54a806..8bef873 100755 --- a/stage4/configure-xorg +++ b/stage4/configure-xorg @@ -1,8 +1,6 @@ #!/bin/bash -source ../config/sysinfos -source ../functions -source ../config/packages-list +source ../functions/main # Used by startx cat > /etc/skel/.xinitrc << "EOF" @@ -125,89 +123,40 @@ 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 + +# Updating font information cache. +fc-cache -f exit $?