Jim McQuillan wrote:
> Rob,
> 
> Thanks for your feedback on the 2.09pre2 release.
> 
> Could you please send me a copy of your rc.setupx script ?  I want to 
> make sure
> I get it right.
> 
> Thanks,
> 
> Jim McQuillan
> [EMAIL PROTECTED]


You'll want to take out the modeline line that I putin to get the 
resolution I need.


-- 
Rob Davis,  at home, on the Linux Box...


# rc.setupx
#
# This script will generate the XF86Config-4 file for a diskless workstation, as
# part of the Linux Terminal Server Project (http://www.LTSP.org)
# 

. /etc/ltsp_functions

################################################################################
#
# Get the IP address of the default server.  This is used for XDM_SERVER,
# TELNET_HOST and SYSLOG_HOST if any of them are not set explicitly.
# Default to '192.168.0.254' if it is NOT set in the config file.
#

DEFAULT_SERVER=`get_cfg SERVER 192.168.0.254`

################################################################################
#
# Build the XF86Config file
#
echo "Building the XF86Config-4 file"

XF86CONFIG=/tmp/XF86Config
X_MOUSE_PROTOCOL=`     get_cfg  X_MOUSE_PROTOCOL`
X_MOUSE_DEVICE=`       get_cfg  X_MOUSE_DEVICE`
X_MOUSE_RESOLUTION=`   get_cfg  X_MOUSE_RESOLUTION`
X_MOUSE_BUTTONS=`      get_cfg  X_MOUSE_BUTTONS`
X_MOUSE_EMULATE3BTN=`  get_cfg  X_MOUSE_EMULATE3BTN N`
X_COLOR_DEPTH=`        get_cfg  X_COLOR_DEPTH`

if [ "${X_MOUSE_EMULATE3BTN}" = "Y" ]; then
    EMULATE_3_BUTTONS="on"
fi

#-----------------------------------------------------------------------
#
# Setup server layout
#
cat <<-EOF >${XF86CONFIG}
Section "ServerLayout"
        Identifier "XFree86 Configured"
        Screen      0   "Screen0" 0 0
        InputDevice     "Mouse0" "CorePointer"
        InputDevice     "Keyboard0" "CoreKeyboard"
EndSection

EOF

#-----------------------------------------------------------------------
#
# Setup the FontPath info
#
USE_XFS=`get_cfg USE_XFS N`

if [ "${USE_XFS}" = "Y" ]; then
    XFS_SERVER=`get_cfg XFS_SERVER ${DEFAULT_SERVER}`
    cat <<-EOF >>${XF86CONFIG}
Section "Files"
        FontPath   "tcp/${XFS_SERVER}:7100"
EndSection
EOF
else
cat <<-EOF >>${XF86CONFIG}
Section "Files"
        RgbPath    "/usr/X11R6/lib/X11/rgb"
        FontPath   "/usr/X11R6/lib/X11/fonts/misc/"
        FontPath   "/usr/X11R6/lib/X11/fonts/Type1/"
        FontPath   "/usr/X11R6/lib/X11/fonts/Speedo/"
        FontPath   "/usr/X11R6/lib/X11/fonts/75dpi/"
        FontPath   "/usr/X11R6/lib/X11/fonts/100dpi/"
EndSection
EOF
fi

#-----------------------------------------------------------------------
#
# Setup module info
#
cat <<-EOF >>${XF86CONFIG}

Section "Module"
        Load   "extmod"
EOF
#
# Load any optional modules for the X server
#
for i in 01 02 03 04 05 06 07 08 09 10; do
    MODULE=`get_cfg X4_MODULE_${i}`
    if [ "${MODULE}" ]; then
        echo "        Load   \"${MODULE}\" " >>${XF86CONFIG}
    fi
done

#
# If the xfs is not being used the following two modules are required
#
if [ "${USE_XFS}" = "N" ]; then
    echo "        Load   \"freetype\"" >>${XF86CONFIG}
    echo "        Load   \"type1\""    >>${XF86CONFIG}
fi
echo "EndSection" >>${XF86CONFIG}

#-----------------------------------------------------------------------
#
# Setup Keyboard and Mouse info
#

XkbLayout=`        get_cfg  XkbLayout`


cat <<-EOF >>${XF86CONFIG}

Section "InputDevice"
       Identifier  "Keyboard0"
       Driver      "keyboard"
       Option      "XkbLayout" "${XkbLayout:-"us"}"
EndSection

Section "InputDevice"
       Identifier  "Mouse0"
       Driver      "mouse"
       Option      "Device"          "${X_MOUSE_DEVICE:-"/dev/psaux"}"
       Option      "Protocol"        "${X_MOUSE_PROTOCOL:-"PS/2"}"
       Option      "Emulate3Buttons" "${EMULATE_3_BUTTONS:-"off"}"
       Option      "ZAxisMapping"     "4 5"
       Option      "Buttons"         "${X_MOUSE_BUTTONS:-"3"}"
EndSection
EOF

#-----------------------------------------------------------------------
#
# Setup the Monitor info
#

X_HORZSYNC=`      get_cfg X_HORZSYNC      "31-62"`
X_VERTREFRESH=`   get_cfg X_VERTREFRESH   "55-90"`
X4_DRIVER=`       get_cfg X4_DRIVER`
X4_BUSID=`        get_cfg X4_BUSID`

if [ -z "${X4_BUSID}" ]; then
    BUSID=""
else
    BUSID="BusID     \"${X4_BUSID}\""
fi

cat <<-EOF >>${XF86CONFIG}

Section "Monitor"
        Identifier      "My Monitor"
        VendorName      "Unknown"
        ModelName       "Unknown"
        HorizSync       ${X_HORZSYNC}
        VertRefresh     ${X_VERTREFRESH}
        Modeline "1280x1024" 105.00 1280 1328 1440 1688 1024 1025 1028 1066 -hsync 
-vsync
EndSection

Section "Device"
        Identifier "My Video Card"
        Driver "${X4_DRIVER:-"vga"}"
        ${BUSID}
        Option "DPMS"
EndSection

EOF
#-----------------------------------------------------------------------
#
# Setup the Screen info
#
MODE[0]=`       get_cfg X_MODE_0`
MODE[1]=`       get_cfg X_MODE_1`
MODE[2]=`       get_cfg X_MODE_2`

if [ -z "${MODE[0]}${MODE[1]}${MODE[2]}" ]; then
    MODE[0]="1024x768"
    MODE[1]="800x600"
    MODE[2]="640x480"
fi

if [ -n "${MODE[0]}" ]; then
    MODE[0]=\"${MODE[0]}\"
fi

if [ -n "${MODE[1]}" ]; then
    MODE[1]=\"${MODE[1]}\"
fi

if [ -n "${MODE[2]}" ]; then
    MODE[2]=\"${MODE[2]}\"
fi

cat <<-EOF >>${XF86CONFIG}
Section "Screen"
        Identifier "Screen0" 
        Device "My Video Card" 
        Monitor "My Monitor"
        DefaultDepth  ${X_COLOR_DEPTH:-16}
        Subsection "Display"
                Depth ${X_COLOR_DEPTH:-16}
                Modes ${MODE[*]}
        EndSubSection
EndSection

EOF

#-----------------------------------------------------------------------
#
# Any dri options that may be required
#
X4_DRI=`       get_cfg X4_DRI`
cat <<-EOF >>${XF86CONFIG}
Section "DRI"
        ${X4_DRI}
EndSection
EOF

Reply via email to