Borderlands GOTY

Borderlands GOTY

Not enough ratings
Running BL1 on Linux
By Summerisle
W.I.N.E = WINE Is Not [an] Emulator
   
Award
Favorite
Favorited
Unfavorite
Intro
Firstly, I would like to remind you that Wine Is Not an Emulator (W.I.N.E). This means that you can effectively run PE files natively on Linux. After all, we are all pretty much using the same CPU IS (80x86 w/ PAE or 64-bit extensions).

As such, most games, provided that the developers didn't do any wierd ♥♥♥♥, such as use undocumented or internal WinAPI interfaces. You should note that the Steam Overlay is one such application. To my knowledge, it's broken on every platform, based on what I hear from my Win/Mac friends. I'll touch on this later.
Environment
This is the environment I wrote the guide on:

  • Debian Testing
  • Linux-PF 4.2.0-pf1koopa-05683-gd46c801
  • Wine 1.6.2

Hardware is not terribly relevant here, especially considering that BL1 will run on most remotely decent hardware.
Set up a WINE prefix and steam launcher
If you already have a copy of steam for windows configured with wine, you may skip this section.

I'm writing this for BASH-compatible/POSIX-compliant shells, although I personally don't use one. If you know what I'm talking about, and don't use one either, I trust that you can adapt.

First, you will want to choose a location for your windows steam install. I use '$HOME/.local/share/steam-wine'.

First, do the following to configure the prefix for the first time:

export WINEARCH=win32 WINEPREFIX=$HOME/.local/share/steam-wine mkdir -p $WINEPREFIX wineboot

Next, install steam (run this in the same shell so that WINEPREFIX is the same):

wget 'https://steamcdn-a.akamaihd.net/client/installer/SteamSetup.exe' --output-document=/tmp/steam.exe wine /tmp/steam.exe

Complete the steam install and log in to steam.

Now, for the sake of convenience, create a shell script to launch steam/windows. Just copy the below to a file named, for example, steam-win, or steam.exe, changing WINEPREFIX to fit your setup:

#!/bin/bash export WINEARCH=win32 export WINEPREFIX=$HOME/.local/share/steam-wine $WINEPREFIX/drive_c/Program\ Files/Steam/Steam.exe -no-dwrite "$@"

Copy this to a folder in your path. Do not put this in /usr/bin (you should never put things here), nor /usr/local/bin (that's for system-wide software). I would suggest '$HOME/.local/bin', or '$HOME/bin/' if the former does not exist.
Install Borderlands
Proceed to install Borderlands via Steam as you would normally due, but using the Windows client under WINE.
Configure Borderlands
Due to the Steam overlay not knowing when enough is enough (quite literally, it will randomly cause memory protection faults in the game process), you must be sure to disable the overlay in the steam game options for Borderlands unless you like to live dangerously.

Having done that, you may wish to start the game once in order for it to install its configuration files. If you do so, you may find the configuration files under '$HOME/My Games/Borderlands/WillowGame/Config'. Be aware that this _will_ result in your display resolution being changed. It will not change back automatically!

Configure BL1 to use your preferred resolution by modifying the 'ResX' and 'ResY' values in WillowEngine.ini. You may also want to wish to set the value 'OneFrameLagThread' to 'False' if you experience mouse "choppines".

Configure WINE
Wine allows you to configure several of its different subsystems behaviours, as well as modifying its behaviour specifically for one program.

Download these three registry config files:


Note that the last two files appy prefix-wide.

Now, making sure that 'WINEPREFIX' is set correctly, run 'regedit' and import said files.

These configure ceartain registry keys such that:

  • Windows applications may not modify output settings
  • The D3D implementation uses the OpenGL backend rather than the GDI backend
  • Cursor warping is not disabled for Borderlands.exe
  • The window manager is not allow to decorate or manage any windows created by Borderlands.exe
  • The reported windows version is win7

After importing the registry files, set the value at 'HKEY_CURRENT_USER\Software\Wine\Direct3D\VideoMemorySize' to reflect the amount of video memory your graphics card has in megabytes. For instance, set it to '256' for 256MB, '1024' for 1GB, etc...
Postscript / Caveats
Running two steam clients simultaneously on the same hostname

This can lead to issues with steam chat such that the steam community will become unavailable on both clients and will not reconnect until only one client is open, and that client was restarted after closing the other client.

Steam has no text at all

dwrite.dll and Steam hate each other right now. Be sure that you started steam with '-no-dwrite'.

Errors about steamwebhelper / Black web pages

The embedded webkit will not work under wine due to some real hella rendering surface voodoo. Ignore it. Ignore the "fatal" errors, too. Those just indicate that the steam browser process has crashed. This should never result in steam exiting.

Notes about windowed mode / window decorations

I personally experienced many issues when BL1 was run under a virtual desktop (see winecfg/graphics for that). These issues also extend to running BL1 in windowed mode. Though, in retrospect, the nature of these problems leads me to believe that these issues were caused by the steam overlay, so I will have to revisit this at some other time.
4 Comments
Summerisle  [author] 14 May, 2018 @ 11:19pm 
RIP Sprunge.
Brian [Linux] 18 Jan, 2017 @ 8:37am 
I know this is an old post but I'm running BL1 under playonlinux using 1.7.53-steam_crossoverhack. Frame rates are low but the game is entirely playable. I've done an entire playthrough and am now on the DLCs with zero problems.

If you are trying to install this game today, use PlayOnLinux, it is really simple.
Doc Scratch 1 Jan, 2016 @ 1:35am 
WINE actually IS an emulator. Just not an OS emulator.
lizzy 🏳️‍⚧ 16 Nov, 2015 @ 5:07pm 
cool story bro