eventhorizon
Participant
Post count: 2

This is what I use:

1. sudo vi /etc/rc.local

2. Add the following code at the end, just before the “exit 0” line:

echo Waiting for controller
while ! ls /dev/js* 1>/dev/null 2>&1
do
sleep 1
done
echo Controller found

3. Save

4. Reboot

What this does is wait indefinitely at bootup until a controller is connected. It works perfectly for my PS3 controller over either bluetooth or USB.