xboxdrv-daemon (1)

NAME
xboxdrv-daemon - A simple daemon that automatically launches xboxdrv when it detects a controller.

SYNOPSIS
xboxdrv
[OPTION]... [--] {XBOXDRV} [ARGS]...

DESCRIPTION

\FC-h\F[], \FC--help\F[]
    Display help text and exit.

\FC--version\F[]
    Print the version number and exit.

\FC-v\F[], \FC--verbose\F[]
    Be verbose with printed output.

\FC-a FILENAME, --attach=FILENAME\F[]
    Launch EXE when a new controller is connected

\FC-d FILENAME, --detach=FILENAME\F[]
    Launch EXE when a controller is detached

\FC-x FILENAME, --xboxdrv=FILENAME\F[]
    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:

\FC% xboxdrv-daemon --xboxdrv ./xboxdrv\F[]

You can pass arguments to xboxdrv after a double dash '--':

\FC% xboxdrv-daemon -- --buttonmap B=A,X=A,Y=A\F[]

You can also run scripts that get started after xboxdrv is started via:

\FC% xboxdrv-daemon \
  --attach /home/juser/xboxdrv_attach \
  --detach /home/juser/xboxdrv_deatach\F[]

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:

\FC#!/bin/sh
# Start xboxdrv and remember its PID in the variable XBOXPID
xboxdrv --trigger-as-button -s &amp;
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 #\F[]

That way you can individually configure every game and still not have to worry about launching xboxdrv manually.

SEE ALSO
xboxdrv(1)