source: flair-bin/tags/0.0.2/tools/scripts/dualshock3.sh

Last change on this file was 65, checked in by Sanahuja Guillaume, 6 years ago

use xinput to disable ds3 mouse in recent kernel

  • Property svn:executable set to *
File size: 709 bytes
Line 
1#! /bin/bash
2ARCH_DIR=$(uname -m)
3
4#on kernel >=4.13, ds3 is seen as a mouse
5/usr/bin/xinput set-prop 'Sony PLAYSTATION(R)3 Controller' 'Device Enabled' 0
6
7#This script is the only one that calls itself with sudo.
8#As a consequence, only one exception is needed in sudoers (the following 2 lines)
9# Defaults!/opt/flair/flair-bin/tools/scripts/dualshock3.sh setenv
10# uav ALL=(root) /opt/flair/flair-bin/tools/scripts/dualshock3.sh
11
12#we must run as root
13if [ $EUID -ne 0 ]; then
14 exec sudo -E $0 $*
15fi
16
17. ${FLAIR_ROOT}/flair-bin/tools/scripts/ubuntu_cgroup_hack.sh
18
19export LD_LIBRARY_PATH="${OECORE_HOST_SYSROOT}/usr/lib:${OECORE_HOST_SYSROOT}/lib"
20${FLAIR_ROOT}/flair-bin/tools/$ARCH_DIR/unix/dualshock3 $*
Note: See TracBrowser for help on using the repository browser.