]> code.ossystems Code Review - openembedded-core.git/commitdiff
xserver-nodm-init: Change hidraw mode to allow normal user access
authorZhai Edwin <edwin.zhai@intel.com>
Fri, 26 Aug 2011 11:59:54 +0000 (19:59 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 7 Sep 2011 21:28:34 +0000 (22:28 +0100)
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@intel.com>
meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm

index 858af0b67e18e5a9009f201073b8977989915c38..c707a4bdb8fff0e3a0c03a41afd0185a1ea0fe2d 100755 (executable)
@@ -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