[OE-core] [PATCH 1/2] xserver-nodm-init: Change hidraw mode to allow normal user access

edwin.zhai at intel.com edwin.zhai at intel.com
Tue Sep 6 02:36:12 UTC 2011


From: Zhai Edwin <edwin.zhai at intel.com>

USB HID like touch screen could be presented as hidraw* device, this change
make user under rootless X can access them.

Signed-off-by: Zhai Edwin <edwin.zhai at intel.com>
---
 .../x11-common/xserver-nodm-init/xserver-nodm      |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm b/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm
index 858af0b..c707a4b 100755
--- a/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm
+++ b/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm
@@ -34,6 +34,10 @@ case "$1" in
            chmod o+w /var/log
            chmod g+r /dev/tty[0-3]
            chmod o+rw /dev/input/*
+           # hidraw device is probably needed
+           if [ -e /dev/hidraw0 ]; then
+               chmod o+rw /dev/hidraw*
+           fi
        fi
        # Using su rather than sudo as latest 1.8.1 cause failure [YOCTO #1211]
        su -l -c '/etc/X11/Xserver&' $username 
-- 
1.7.1





More information about the Openembedded-core mailing list