summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDirk von Suchodoletz2009-01-11 18:34:14 +0100
committerDirk von Suchodoletz2009-01-11 18:34:14 +0100
commitca2b9b1ff1e0bb783a0ff3b747d41e18f9e9553e (patch)
treee159719a6aae9422ef9f8e31b4dc0dea56455a2a
parentSome fixes to x11vnc plugin (x11mod). (diff)
downloadcore-ca2b9b1ff1e0bb783a0ff3b747d41e18f9e9553e.tar.gz
core-ca2b9b1ff1e0bb783a0ff3b747d41e18f9e9553e.tar.xz
core-ca2b9b1ff1e0bb783a0ff3b747d41e18f9e9553e.zip
Better configuration of touchpads ...
git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2463 95ad53e4-c205-0410-b2fa-d234c58c8868
-rwxr-xr-xinitramfs/stage3-stuff/bin/hwautocfg3
-rw-r--r--os-plugins/plugins/xserver/XX_xserver.sh63
-rw-r--r--os-plugins/plugins/xserver/init-hooks/00-started/xserver.sh16
3 files changed, 53 insertions, 29 deletions
diff --git a/initramfs/stage3-stuff/bin/hwautocfg b/initramfs/stage3-stuff/bin/hwautocfg
index 738c0979..f50b8432 100755
--- a/initramfs/stage3-stuff/bin/hwautocfg
+++ b/initramfs/stage3-stuff/bin/hwautocfg
@@ -34,7 +34,8 @@ ash /etc/modprobe.base; mdev -s
# optimization possible: exclude network and usb base drivers from the
# following list (bios detection for non-hwautocfg component)
( hwinfo --pci >/etc/hwinfo.data; echo "read pci device list at $(sysup)" \
- >/tmp/hwdataready; hwinfo --bios >/etc/hwinfo.bios ) &
+ >/tmp/hwdataready ) &
+( usleep 100000 ; hwinfo --bios >/etc/hwinfo.bios ) &
return 0
}
diff --git a/os-plugins/plugins/xserver/XX_xserver.sh b/os-plugins/plugins/xserver/XX_xserver.sh
index 882da329..3b5496be 100644
--- a/os-plugins/plugins/xserver/XX_xserver.sh
+++ b/os-plugins/plugins/xserver/XX_xserver.sh
@@ -146,27 +146,6 @@ Section "InputDevice"
# Option "Emulate3Buttons" "true"
Option "CorePointer"
EndSection
-Section "InputDevice"
- Driver "wacom"
- Identifier "Stylus"
- Option "Device" "/dev/input/wacom"
- Option "Type" "stylus"
- Option "ForceDevice" "ISDV4" # Tablet PC ONLY
-EndSection
-Section "InputDevice"
- Driver "wacom"
- Identifier "Eraser"
- Option "Device" "/dev/input/wacom"
- Option "Type" "eraser"
- Option "ForceDevice" "ISDV4" # Tablet PC ONLY
-EndSection
-Section "InputDevice"
- Driver "wacom"
- Identifier "Cursor"
- Option "Device" "/dev/input/wacom"
- Option "Type" "cursor"
- Option "ForceDevice" "ISDV4" # Tablet PC ONLY
-EndSection
Section "Device"
Identifier "Generic Video Card"
Driver "vesa"
@@ -194,14 +173,10 @@ Section "ServerLayout"
Screen "Default Screen"
InputDevice "Generic Keyboard"
InputDevice "Generic Mouse"
- InputDevice "Stylus" "SendCoreEvents"
- InputDevice "Cursor" "SendCoreEvents"
- InputDevice "Eraser" "SendCoreEvents"
EndSection
Section "DRI"
Mode 0666
-EndSection
-' >> $xfc
+EndSection' >> $xfc
# if no module was detected, stick to vesa module
if [ -n "$xmodule" ] ; then
sed "s/vesa/$xmodule/;s/\"us\"/\"${XKEYBOARD}\"/" -i $xfc
@@ -267,8 +242,37 @@ a\ \ InputDevice\ \ "Synaptics TP"\ \ \ \ \ \ "SendCoreEvents"
ln -sf /usr/lib/libGL_MESA.so.1.2 /mnt/var/X11R6/lib/libGL.so.1.2
fi
fi
-
- [ $DEBUGLEVEL -gt 0 ] && echo "done with 'xserver' os-plugin ...";
+
+ # check if tablet hardware available, read device information from file
+ if [ -e /etc/tablet.conf ]; then
+ . /etc/tablet.conf
+ echo -e 'Section "InputDevice"
+ Driver "wacom"
+ Identifier "Stylus"
+ Option "Device" "/dev/input/wacom"
+ Option "Type" "stylus"
+ Option "ForceDevice" "ISDV4" # Tablet PC ONLY
+EndSection
+Section "InputDevice"
+ Driver "wacom"
+ Identifier "Eraser"
+ Option "Device" "/dev/input/wacom"
+ Option "Type" "eraser"
+ Option "ForceDevice" "ISDV4" # Tablet PC ONLY
+EndSection
+Section "InputDevice"
+ Driver "wacom"
+ Identifier "Cursor"
+ Option "Device" "/dev/input/wacom"
+ Option "Type" "cursor"
+ Option "ForceDevice" "ISDV4" # Tablet PC ONLY
+EndSection' >> ${xfc}
+ sed -e "s,/dev/in.*,/dev/${wacomdev}," \
+ -e '/e \"Generic Mouse\"/a\\ \ InputDevice "Stylus" "SendCoreEvents"' \
+ -e '/e \"Generic Mouse\"/a\\ \ InputDevice "Cursor" "SendCoreEvents"' \
+ -e '/e \"Generic Mouse\"/a\\ \ InputDevice "Eraser" "SendCoreEvents"' \
+ -i ${xfc}
+ fi
# some configurations produce no proper screen resolution without
# Horizsync and Vertrefresh set (more enhancements might be needed for
@@ -302,6 +306,9 @@ a\ \ InputDevice\ \ "Synaptics TP"\ \ \ \ \ \ "SendCoreEvents"
# run distro specific generated stage3 script
[ -e /mnt/opt/openslx/plugin-repo/xserver/xserver.sh ] && \
. /mnt/opt/openslx/plugin-repo/xserver/xserver.sh
+
+ [ $DEBUGLEVEL -gt 0 ] && echo "done with 'xserver' os-plugin ..."
+
fi
elif [ ! -e /initramfs/plugin-conf/xserver.conf ]; then
[ $DEBUGLEVEL -gt 2 ] && \
diff --git a/os-plugins/plugins/xserver/init-hooks/00-started/xserver.sh b/os-plugins/plugins/xserver/init-hooks/00-started/xserver.sh
index 880bcb8d..4efee5a3 100644
--- a/os-plugins/plugins/xserver/init-hooks/00-started/xserver.sh
+++ b/os-plugins/plugins/xserver/init-hooks/00-started/xserver.sh
@@ -2,7 +2,23 @@
# automatic Xorg configation fails in this field. If no useable info was
# detected just delete the file.
+# tablet detection function
+tabletdetect () {
+ sleep 1; waitfor /etc/hwinfo.bios 20000
+ # quickhack for IBM X61 tablet detection
+ if grep -qi tablet /etc/hwinfo.bios ; then
+ echo 'wacomdev="ttyS0"' >/etc/tablet.conf
+ fi
+ # wacom device attached to usb - code to be tested
+ if [ ! -e /etc/tablet.conf ]; then
+ if hwinfo --usb | grep -qi tablet ; then
+ echo 'wacomdev="input/wacom"' >/etc/tablet.conf
+ fi
+ fi
+}
+
( hwinfo --monitor >/etc/hwinfo.display; grep "Generic Monitor" \
/etc/hwinfo.display >/dev/null 2>&1 && rm /etc/hwinfo.display ) &
( hwinfo --gfxcard >/etc/hwinfo.gfxcard ) &
+( tabletdetect ) &