[K12OSN] Another small K12LTSP 4.1.0 beta bug
Eric Harrison
eharrison at mail.mesd.k12.or.us
Sun Jul 18 05:20:39 UTC 2004
After more pounding on the K12LTSP 4.1.0 beta 1, I found another
small bug: USB mice do not automagically work like they did in
K12LTSP 4.0.0.
I missed one of the patches I apply (and keep sending to Jim ;-)
that configure X to support both PS/2 & USB mice from the same
config.
If you have K12LTSP 4.1.0 beta 1 installed & are using USB mice,
the corrected file is attached. Save this as:
/opt/ltsp/i386/etc/build_x4_cfg
then make it executable:
chmod a+x /opt/ltsp/i386/etc/build_x4_cfg
and then all will be well.
I'll build new LTSP packages & resend the patch off to Jim...
-Eric
-------------- next part --------------
# build_x4_cfg
#
# This script will generate the XF86Config-4 file for a diskless workstation, as
# part of the Linux Terminal Server Project (http://www.LTSP.org)
#
X4_DRIVER=$1
. /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=${SERVER:-"192.168.0.254"}
################################################################################
#
# Build the XF86Config file
#
echo "Building the /tmp/XF86Config-4 file" >/dev/tty
X_MOUSE_BAUD=${X_MOUSE_BAUD:-"1200"}
X_MOUSE_EMULATE3BTN=${X_MOUSE_EMULATE3BTN:-"N"}
if [ "${X_MOUSE_EMULATE3BTN}" = "Y" ]; then
EMULATE_3_BUTTONS="on"
fi
#-----------------------------------------------------------------------
#
# Setup server layout
#
cat <<-EOF
Section "ServerLayout"
Identifier "XFree86 Configured"
Screen 0 "Screen0" 0 0
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "Mouse0" "CorePointer"
InputDevice "Mouse1" "AlwaysCore"
EOF
#-----------------------------------------------------------------------
#
# See if touchscreen is set up
#
USE_TOUCH=${USE_TOUCH:-"N"}
if [ "${USE_TOUCH}" = "Y" ]; then
cat <<-EOF
InputDevice "Elographics" "CorePointer"
EOF
fi
echo EndSection
#-----------------------------------------------------------------------
#
# Setup the FontPath info
#
USE_XFS=${USE_XFS:-"N"}
if [ "${USE_XFS}" = "Y" ]; then
XFS_SERVER=${XFS_SERVER:-${DEFAULT_SERVER}}
cat <<-EOF
Section "Files"
FontPath "tcp/${XFS_SERVER}:7100"
EndSection
EOF
else
cat <<-EOF
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/75dpi/"
FontPath "/usr/X11R6/lib/X11/fonts/100dpi/"
EndSection
EOF
fi
#-----------------------------------------------------------------------
#
# Setup module info
#
cat <<-EOF
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
MODVAR=X4_MODULE_${i}
MODULE=${!MODVAR}
if [ "${MODULE}" ]; then
echo " Load \"${MODULE}\" "
fi
done
#
# If the xfs is not being used the following two modules are required
#
if [ "${USE_XFS}" = "N" ]; then
echo " Load \"freetype\""
echo " Load \"type1\""
fi
echo "EndSection"
#-----------------------------------------------------------------------
#
# Setup Keyboard and Mouse info
#
cat <<-EOF
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 "BaudRate" "${X_MOUSE_BAUD}"
Option "Resolution" "${X_MOUSE_RESOLUTION}"
Option "Emulate3Buttons" "${EMULATE_3_BUTTONS:-"off"}"
Option "ZAxisMapping" "4 5"
Option "Buttons" "${X_MOUSE_BUTTONS:-"3"}"
EndSection
Section "InputDevice"
Identifier "Mouse1"
Driver "mouse"
Option "Device" "${X_USBMOUSE_DEVICE:-"/dev/input/mice"}"
Option "Protocol" "${X_USBMOUSE_PROTOCOL:-"PS/2"}"
Option "BaudRate" "${X_USBMOUSE_BAUD}"
Option "Resolution" "${X_USBMOUSE_RESOLUTION}"
Option "Emulate3Buttons" "${USBEMULATE_3_BUTTONS:-"off"}"
Option "ZAxisMapping" "4 5"
Option "Buttons" "${X_USBMOUSE_BUTTONS:-"3"}"
EndSection
EOF
#-----------------------------------------------------------------------
#
# Setup the Touch Screen operating parameters
#
if [ "${USE_TOUCH}" = "Y" ]; then
cat <<-EOF
Section "InputDevice"
Identifier "Elographics"
Driver "elographics"
Option "Device" "${X_TOUCH_DEVICE:-/dev/ttyS0}"
Option "DeviceName" "Elo"
Option "MinimumXPosition" "${X_TOUCH_MINX:-433}"
Option "MaximumXPosition" "${X_TOUCH_MAXX:-3588}"
Option "MinimumYPosition" "${X_TOUCH_MINY:-569}"
Option "MaximumYPosition" "${X_TOUCH_MAXY:-3526}"
Option "UntouchDelay" "${X_TOUCH_UNDELAY:-10}"
Option "ReportDelay" " ${X_TOUCH_RPTDELAY:-10}"
Option "AlwaysCore"
EndSection
EOF
fi
#-----------------------------------------------------------------------
#
# Setup the Monitor info
#
X_HORZSYNC=${X_HORZSYNC:-"31-62"}
X_VERTREFRESH=${X_VERTREFRESH:-"55-90"}
if [ -z "${X4_BUSID}" ]; then
BUSID=""
else
BUSID="BusID \"${X4_BUSID}\""
fi
if [ -z "${X_VIDEORAM}" ]; then
XVIDRAM=""
else
XVIDRAM="VideoRam ${X_VIDEORAM}"
fi
#
# Extract Modelines and Video modes from the custom modes.
#
MODE[0]=`echo ${X_MODE_0} | cut -f1 -d" "`
LINE[0]="`echo ${X_MODE_0} | cut -f2- -d" " -s`"
MODE[1]=`echo ${X_MODE_1} | cut -f1 -d" "`
LINE[1]="`echo ${X_MODE_1} | cut -f2- -d" " -s`"
MODE[2]=`echo ${X_MODE_2} | cut -f1 -d" "`
LINE[2]="`echo ${X_MODE_2} | cut -f2- -d" " -s`"
cat <<-EOF
Section "Monitor"
Identifier "My Monitor"
VendorName "Unknown"
ModelName "Unknown"
HorizSync ${X_HORZSYNC}
VertRefresh ${X_VERTREFRESH}
EOF
if [ -n "${LINE[0]}" ]; then
echo " Modeline \"${MODE[0]}\" ${LINE[0]}"
fi
if [ -n "${LINE[1]}" ]; then
echo " Modeline \"${MODE[1]}\" ${LINE[1]}"
fi
if [ -n "${LINE[2]}" ]; then
echo " Modeline \"${MODE[2]}\" ${LINE[2]}"
fi
cat <<-EOF
EndSection
Section "Device"
Identifier "My Video Card"
Driver "${X4_DRIVER}"
${BUSID}
${XVIDRAM}
EOF
for i in 01 02 03 04 05 06 07 08 09 10; do
X_DEV_VAR=X_DEVICE_OPTION_${i}
X_DEVICE_OPTION=${!X_DEV_VAR}
if [ "${X_DEVICE_OPTION}" ]; then
echo " Option \"${X_DEVICE_OPTION}\""
fi
done
cat <<-EOF
EndSection
EOF
#-----------------------------------------------------------------------
#
# Setup the Screen info
#
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
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
#
cat <<-EOF
Section "DRI"
${X4_DRI}
EndSection
EOF
More information about the K12OSN
mailing list