User Tools

Site Tools


robots:phoenix:manual:gamepad

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
robots:phoenix:manual:gamepad [2014/02/24 18:28]
claes
robots:phoenix:manual:gamepad [2021/08/14 04:21] (current)
Line 12: Line 12:
      
 The gamepad is now installed on the computer. The gamepad is now installed on the computer.
 +
 +==== Permissions ====
 +Do the following steps:
 +  - Add a new group <code>sudo groupadd gamepad</code>
 +  - Add your user to the group <code>useradd -G gamepad [username]</code>
 +  - Add the file joystick_acl_correction.sh  to <code>/etc/udev/</code>
 +  - Make joystick_acl_correction.sh executable <code>sudo chmod a+x joystick_acl_correction.sh</code>
 +  - Add the file  80-local.rules to <code>/etc/udev/rules.d/</code> The udev-rule file is numbered 80 to make sure it is executed after /lib/udev/rules.d/70.udev-acl.rules
 +
 +
 +<file bash joystick_acl_correction.sh>
 +#!/bin/bash
 +
 +if [ -c /dev/input/js* ]; # -c is a character device - see http://tldp.org/LDP/abs/html/fto.html for option
 +then
 + setfacl -m g:gamepad:rw- /dev/input/js* #for ACL see https://help.ubuntu.com/community/FilePermissionsACLs 
 +    echo "Gamepad ACL permission set"
 +else
 +    echo "No gamepad detected, ACL not set"
 +fi
 +</file>
 +
 +<file bash 80-local.rules>
 +#This rule is to make the Logitec gamepad read/writeable for the normal user.
 +SUBSYSTEM=="input", ATTRS{name}=="Generic X-Box pad", GROUP="gamepad", MODE="0660", RUN+="/etc/udev/joystick_acl_correction.sh"
 +</file>
 +
 +
  
 ===== Running MobotWare with Gamepad ===== ===== Running MobotWare with Gamepad =====
robots/phoenix/manual/gamepad.1393262884.txt.gz · Last modified: 2021/08/14 04:20 (external edit)