Integrating Steam into XBMC using xpad and xboxdrv
Now, I am going to assume I am not the only person on earth with this situation. I own and maintain a HTPC, otherwise known to most as a “Home Theatre PC.” I custom configured the xboxdrv userland module in a previous HTPC Project post, so that I could full use a Microsoft Xbox controller as a mouse + keyboard. This enabled quick restart/shutdown, mouse movement, and media controls. The problem was, if I wanted to use Steam, a custom configured xboxdrv set was not gong to play well with Steam. The solution was simple…
Creating a custom Steam Launcher
Most users how configure and implement xboxdrv, know that most times, unloading the xpad module is necessary. A simple “rmmod xpad” will do the trick, and additionally you can blacklist the module permanently:
echo "blacklist xpad" > /etc/modprobe.d/blacklist.conf
Steam plays most well with the standard xpad module. So how do you bounce back and forth with Steam? How can I implement that into XBMC? A simple script is all it takes. The script I made (as simple as it is), does the following:
- unloads xboxdrv and its configuration
- loads xpad into the kernel
- starts steam with “Steam %U”, the standard launch command
- When Steam exits, reload the xboxdrv configuration for HTPC use
This is assuming you loaded your custom xbodrv configuration on system startup. You can find the script located in the scripts section of the github HTPC repo. Using this simple script, boucing between HTPC use and Steam is quite effortlessly. A shortcut on the desktop will make it handy.
If you want to download the script directly using wget, the command is:
Make the script executable by doing the following:
chmod +x launch_steam.sh
Alternatively, and what I do, is implement the script into XBMC, the method can be found in the “Extending XBMC” post. In summary, load the script using Advanced Launcher, and you’re off to the races. In that sense, loading XBMC on system startup is all I ever need, rarely requiring actual desktop (except for maintenance from time to time).
Any questions of comments? Be sure to leave them below.