Playing WINE games with the Steam Controller

While I do the majority of my gaming through Steam on Ubuntu, there’s always a few games around that I’d like to play and aren’t out for Linux, so I play then through WINE.  This morning I discovered that it’s  possible to play WINE games with your Steam Controller.  As usual with WINE, your mileage may vary, but here’s what I did.

Firstly, you can’t just install the Windows version of Steam.  I don’t know if it would recognise the controller, but even if it would, Steam wont run Big Picture Mode if it’s running in WINE, so you’re out of luck there.

The trick is that you can add launchers for non-steam games (or actually, any application) to your steam library.  These will run with the Steam Overlay, and therefore will support Steam Controller configurations.  To do this, you’ll need to create a .desktop launcher file for your game.  You can do this with a text editor, but I used Arronax.

arronaxSet a title and an icon if you like, then for the command, enter the command to launch your game using WINE.  If you’re using the default WINE prefix, then this can be as simple as:

wine ~/.wine/path/to/your/game.exe

However, I tend to install WINE games using PlayOnLinux, which installs games into separate prefixes, with appropriate versions of WINE.  This means the default command doesn’t cut it.  Instead I created the following a shell script, and set the .desktop file’s command to execute that shell script.  Here’s an example that I used:

#!/bin/bash
export WINEPREFIX=/home/steam/.PlayOnLinux/wineprefix/DiabloIII
export WINELOADER=/home/steam/.PlayOnLinux/wine/linux-x86/1.7.15/bin/wine
export WINESERVER=/home/steam/.PlayOnLinux/wine/linux-x86/1.7.15/bin/wineserver
"$WINELOADER" "$WINEPREFIX/drive_c/Program Files/Diablo III/Diablo III Launcher.exe"

You can find the appropriate wine version by looking at the configuration dialogue for the game in PlayOnLinux.  Note that PlayOnLinux can generate a .desktop files for a game, but these launch PlayOnLinux, and don’t appear to work when launched through Steam.

Once you’ve created your shell script and .desktop file, launch Steam in desktop mode, access your library and select “Add a game… > Add a Non-Steam Game…”.  This will show a list of applications in /usr/share/applications.  Click “Browse” and find the .desktop file you have created, then press “Add Selected Programs”.  The game will now appear in your library.

Launch Big Picture Mode, and select the game from your library.  You can now configure the controller as normal, and the Steam Overlay will launch with the game, giving you full support for the controller!

Bookmark the permalink.

3 Responses to Playing WINE games with the Steam Controller

  1. Mads says:

    Thanks for this 🙂 I was slowly realising that I had in part thought of games like Thief The Dark Project and the old Mount & Blade when I bought the thing only to realize belatedly that those are Windows titles. Looking forward to seeing what I can get working.

  2. Silent-Hunter says:

    What if your WINE game is also in Steam via WINE? Will this still work, or is it too Inceptiony?

    • mark says:

      That works too, just replace the “Diablo III Launcher.exe” line with the appropriate path to steam.exe and an argument to launch your game.

      It’s worth noting that I’ve only tried this using mouse + keyboard mappings, not controller mappings. You can get a real XBox controller recognised in WINE using xboxdrv, but it doesn’t recognise a Steam controller emulating an Xbox controller in my experience. My most tested example is Skyrim, where WASD + mouse worked except for a WINE bug that means you get stuck walking in one direction, so I currently play that with an XBox controller. I expect I ought to do a blog post about that setup too!

Leave a Reply

Your email address will not be published. Required fields are marked *

Unable to load the Are You a Human PlayThru™. Please contact the site owner to report the problem.