How to install Battle.Net and run Blizzard games on Ubuntu 18.10
Solution 1
I base much of my answer on https://www.maketecheasier.com/play-hearthstone-on-ubuntu-linux/ which was the most concise solution, that had still to be tweaked.
Vanilla installation of Ubuntu 18.10 64bit.
Everything in the answer supposes you run it from terminal, even when not explicitly stated.
1. Add WINE staging repository and install it
(WineHQ). Note that you will work with 32bit installations of games, etc.
sudo dpkg --add-architecture i386
wget -nc https://dl.winehq.org/wine-builds/winehq.key
sudo apt-key add winehq.key
sudo apt-add-repository https://dl.winehq.org/wine-builds/ubuntu/
sudo apt update
sudo apt install --install-recommends winehq-staging
2. Configure WINE
Run
winecfg
In the Staging tab, check the following boxes:
Enable CSMT
Enable VAAPI
Enable EAX
Hide Wine version from applications
In the Libraries tab, add entry locationapi
, Edit it and select "Disable":
Now, some other answers on the net say, you have to disable d3d11 as well, but Battle.net launcher apparently doesn't install without it and it turned out that there was no problem running at least Hearthstone and Diablo 3 with D3D11.
In the Applications tab, select Windows version 8.1:
3. Tweak WINE with winetricks
Download winetricks script:
wget https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks
chmod +x winetricks
Now, you will be using 32bit WINE libraries and software versions, so you should prepare all your future runs from terminal for it:
cat >> ~/.bashrc
export WINEARCH=win32
export WINEPREFIX=~/.wine32
Press [CTRL+D] after pasting these 3 lines into terminal, to end adding lines to .bashrc .
Close your existing terminal and open a new one, so that environment variables will be working.
Launch winetricks:
./winetricks
- use the default prefix
- select "Install a Windows DLL or Component" option.
- From there, install "ie8" and "corefonts".
The installs take some time, and you have to click through multiple "OK" buttons.
4. Get normal Windows Battle.net installer from Blizzard Download page
Now, after downloading, you wont generally be able to just click on the resulting .exe file to launch it with Wine, because you need the environment variables WINEARCH and WINEPREFIX. So in general you launch it from terminal with
cd Downloads
wine Battle.net-Setup.exe
Then you should be able to install Hearthstone and play it via launcher app.
As this solution relies on WINE environment variables, so you wont be able to just click on the exe files. You will get a missing DLL Windows error box, if you do.
Instead when you need to relaunch Battle.net launcher after quitting it, use:
cd ~/.wine32/drive_c/Program\ Files/Battle.net/
wine Battle.net\ Launcher.exe
Solution 2
For my install of Overwatch on Ubuntu 18.10, my procedure differed from the above and I'm commenting because most of us end up using bits from several guides.
Differences
I removed old versions of wine by deleting all .wine and .wine32 folders but keeping a backup of old game configs, and any large .dat files saved games and screenshots etc.
Then I removed with
sudo apt remove wine wine-stable wine-staging winehq-stable winehq-staging wine-devel
I tried previous wine versions too so I did a clean OS install in my case (backed up first).
It's important for people to know that the apt key changed on WineHQ on 19th December 2018 and those following old guides will get the wrong key. Your steps have the correct key for those finding this from Google.*
It's also important to add the correct apt repository:
sudo apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ cosmic main'
I set Windows version to 10. On previous wine prefix attempts I tried other versions and had to change a few times during the install steps BUT on a new prefix, just using Windows 10 worked on a 64 bit (default) prefix.
I did
sudo apt install winbind
but that might come with the default install.
ie8 did not work for me, but I didn't need it. For some reason I didn't need the wine-mono or wine-gecko components, but I had needed those on previous OS installs.
I installed the vcrun2015 component before downloading Battle.net-Setup.exe.
I didn't follow the 3 lines about using 32 bit wine and it worked fine without this step or creating a .wine32
Thanks for your writeup and it seems to be a huge or impossible challenge to unify documentation across all the different OS's versions, games, etc. I think the documentation on WineHQ has improved a lot.
Related videos on Youtube
Gnudiff
Updated on September 18, 2022Comments
-
Gnudiff over 1 year
There are various descriptions on the Internet on how to do that, but many of them seem to be outdated and some are contradictory; in some also the actual working part of solution (for me) was in comments, so I decided to share what worked for me.
Hopefully, if there are some changes, other people will be able to add other answers to keep it up to date.
-
Gnudiff over 5 yearsMost interesting. I didn't have to install vcrun and as far as I remember Battle.net didn't install it either.
-
SomeRandomPhysicist over 4 yearshow does this differ to install the 64 bit version?
-
ProgramFOX over 4 yearsStill works for Ubuntu 19.10 and latest winehq-staging (tested for StarCraft II) with one minor change: "corefonts" is now under "Install a font", not "Install a Windows DLL or Component".
-
VasyaNovikov over 4 yearsOn ArchLinux, this instruction worked except d3d11. It has to be not touched, then it works. StarCraft2 works with this instruction as well. Thanks!
-
ceving over 3 yearsHad to follow the following recommendation: If the freezing bug is there: open regedit and navigate to "HKEY_CURRENT_USER > Software > Wine > X11 Drivers" and add a new string with the name "UseTakeFocus" with a Value Data of "N"