-cat > /etc/X11/xorg.conf << "EOF"
-# xorg.conf
-#
-# **********************************************************************
-# Files section.
-# **********************************************************************
-Section "Files"
- RgbPath "/usr/X11R6/lib/X11/rgb"
- ModulePath "/usr/X11R6/lib/modules" # Module search path
- FontPath "_HV_FONTS_PATH_/TrueType"
-
- # Standard XFree86 Fonts
- FontPath "/usr/X11R6/lib/X11/fonts/TTF"
- FontPath "/usr/X11R6/lib/X11/fonts/Type1"
- FontPath "/usr/X11R6/lib/X11/fonts/misc/:unscaled"
- FontPath "/usr/X11R6/lib/X11/fonts/100dpi/:unscaled"
- FontPath "/usr/X11R6/lib/X11/fonts/75dpi/:unscaled"
- FontPath "/usr/X11R6/lib/X11/fonts/local"
- FontPath "/usr/X11R6/lib/X11/fonts/Speedo"
- FontPath "/usr/X11R6/lib/X11/fonts/misc/"
- FontPath "/usr/X11R6/lib/X11/fonts/100dpi/"
- FontPath "/usr/X11R6/lib/X11/fonts/75dpi/"
-EndSection
-
-# **********************************************************************
-# Dynamically loadable modules section.
-# **********************************************************************
-Section "Module"
- Load "dbe" # Double buffer extension
-
- # This loads the miscellaneous extensions module, and disables
- # initialisation of the XFree86-DGA extension within that module.
- SubSection "extmod"
- Option "omit xfree86-dga" # don't initialise the DGA extension
- EndSubSection
-
- # This loads the Type1 and FreeType font modules
- Load "type1"
- Load "speedo"
- Load "freetype"
-
- Load "glx"
- Load "dri"
-EndSection
-
-# **********************************************************************
-# 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
-
-# **********************************************************************
-# 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"
-EndSection
-
-# **********************************************************************
-# Device (video card) section
-# **********************************************************************
-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
-
-# The ! character is the SED delimiter
-sed -i -e "s!_HV_FONTS_PATH_!${HV_FONTS_PATH}!g" /etc/X11/xorg.conf
-sed -i -e "s!_VIDEO_CARD_DRIVER_!${XF86_CARD_DRIVER}!g" /etc/X11/xorg.conf
-sed -i -e "s!_XF86_KEYBOARD_LAYOUT_!${HV_XF86_KEYBOARD_LAYOUT}!g" /etc/X11/xorg.conf
-sed -i -e "s!_XF86_KEYBOARD_VARIANT_!${HV_XF86_KEYBOARD_VARIANT}!g" /etc/X11/xorg.conf
-sed -i -e "s!_XF86_KEYBOARD_OPTIONS_!${HV_XF86_KEYBOARD_OPTIONS}!g" /etc/X11/xorg.conf