summaryrefslogtreecommitdiffstats
path: root/os-plugins/plugins/xserver/XX_xserver.sh
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 /os-plugins/plugins/xserver/XX_xserver.sh
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
Diffstat (limited to 'os-plugins/plugins/xserver/XX_xserver.sh')
-rw-r--r--os-plugins/plugins/xserver/XX_xserver.sh63
1 files changed, 35 insertions, 28 deletions
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 ] && \