xboxdrv-daemon (1) Linux Manual Page
xboxdrv-daemon – A simple daemon that automatically launches xboxdrv when it detects a controller.
Synopsis
xboxdrv [OPTION]… [–] {XBOXDRV} [ARGS]…Description
- -h, –help
- Display help text and exit.
- –version
- Print the version number and exit.
- -v, –verbose
- Be verbose with printed output.
- -a FILENAME, –attach=FILENAME
- Launch EXE when a new controller is connected
- -d FILENAME, –detach=FILENAME
- Launch EXE when a controller is detached
- -x FILENAME, –xboxdrv=FILENAME
- Set the location of the xboxdrv executable
Running Xboxdrv Via Xboxdrv-Daemon
xboxdrv-daemon allows you to run xboxdrv automatically whenever you plug in a gamepad. Since xboxdrv-daemon.py needs to know where xboxdrv is located you need to supply the location of the xboxdrv binary manually if its not located in PATH:
% xboxdrv-daemon –xboxdrv ./xboxdrvYou can pass arguments to xboxdrv after a double dash ‘–‘:
% xboxdrv-daemon — –buttonmap B=A,X=A,Y=AYou can also run scripts that get started after xboxdrv is started via:
% xboxdrv-daemon \This is useful in Kiosk settings, such as a media center PC, where you might want to restart the media center to have the controller working properly after it got attached.
–attach /home/juser/xboxdrv_attach \
–detach /home/juser/xboxdrv_deatach
Note that you can’t dynamically reconfigurabilty xboxdrv when you launch it automatically via the daemon, so using this daemon isn’t generally recommend.
When you want configurability and automatic launching, it is recomment that you write little startup scripts for your games, such as this:
#!/bin/shThat way you can individually configure every game and still not have to worry about launching xboxdrv manually.
# Start xboxdrv and remember its PID in the variable XBOXPID
xboxdrv –trigger-as-button -s &
XBOXPID=$!
# Give xboxdrv a second to startup and create the device
sleep 1
# Launch your favorite game
your_favorite_game
# Kill xboxdrv and wait for it to finish
kill $XBOXPID
wait $XBOXPID
# EOF #
