xboxdrv-daemon (1) - Linux Manuals
xboxdrv-daemon: A simple daemon that automatically launches xboxdrv when it detects a controller.
NAME
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 ./xboxdrv
You can pass arguments to xboxdrv after a double dash '--':
% xboxdrv-daemon -- --buttonmap B=A,X=A,Y=A
You can also run scripts that get started after xboxdrv is started via:
% xboxdrv-daemon \ --attach /home/juser/xboxdrv_attach \ --detach /home/juser/xboxdrv_deatach
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.
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/sh # 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 #
That way you can individually configure every game and still not have to worry about launching xboxdrv manually.