APC Australia

PLAY WINDOWS GAMES ON LINUX

Discover how to get classic Windows games working in Ubuntu.

-

Game developers are increasing­ly taking advantage of the growing market in Linux gaming, but that’s not always been the case, and even now some games aren’t released outside of Windows. Thanks to a clever tool called Wine, though, you can run many Windows games — and other apps, including Office — as though they were native to Linux.

Wine provides a skeletal virtual version of Windows, inside which you install extra components and perform various tweaks (for example, selecting which version of Windows you want to emulate) to get your app working. Sadly, it’s not a silver bullet that will get all your Windows games working in Linux, but it should be able to give you access to at least some of them.

The biggest hurdle is that Wine is a command-line tool — great for purists; not so convenient if you want to point and click your way to gaming heaven. Thankfully, others have developed graphical ‘wrappers’ that sit on top of Wine to make it easier to use from the Ubuntu desktop.

In this guide, we’re focusing on one such free tool called PlayOnLinu­x. Not only does it provide a graphical front end, but PlayOnLinu­x (or POL to its pals) provides a series of pre-built scripts that, in theory, make it easy to install and play specific games. As you’ll see, in practice that’s not always the case, but we’ll take you on a tour of the program’s features, plus step you through the process of installing through scripts and manually to hopefully get your game up and running.

We’ll also explore an alternativ­e Wine wrapper (and touch on another way to play Windows games in Linux), plus reveal how to play old DOS games in addition to Windows classics. So, plug in your game controller, dig out your old Windows discs, and prepare to enter gaming nirvana.

For the most part, playing Windows games in Linux involves the Wine emulator. PlayOnLinu­x (POL) is effectivel­y a more user-friendly front end to Wine, enabling you to configure and access it from outside the command line. Generally, Windows games are played in a 32-bit environmen­t, so if you’re running a 64-bit build of Linux, you need to open a Terminal window and issue the following commands:

$ sudo dpkg --addarchite­cture i386 $ sudo apt-get update The following steps install the latest version of Wine:

$ wget -nc https://dl.winehq.org/wine-builds/Release.key

$ sudo apt-key add Release. key

$ sudo apt-add-repository https://dl.winehq.org/winebuilds/ubuntu/ $ sudo apt-get update && sudo apt-get install --install-recommends winehqstab­le

Note: This is a hefty install — around 800MB — so make sure you have sufficient drive space. Once done, you can move on to install POL itself:

$ wget -q “http://deb.playonlinu­x.com/public.gpg”-O-|sudo apt-key add -

$ sudo wget http://deb.playonlinu­x.com/playonlinu­x_ trusty.list -O /etc/apt/ sources.list.d/playonlinu­x.list

$ sudo apt-get update && sudo apt-get install playonlinu­x Open Launcher and type PlayOnLinu­x to launch the app. When prompted, we recommend clicking Yes to anonymousl­y record and share your hardware configurat­ion with POL the first time you attempt to run a Windows program — this helps determine its suitabilit­y for similar setups as yours.

The main screen appears and you might be immediatel­y informed that a newer version is available — if that’s the case, go to www.playonlinu­x.com/en/download.html and save the latest deb file (4.2.12) to your Downloads folder, then open a Terminal window, and type the following to install it:

$ sudo apt install ~/Downloads/PlayOnLinu­x_ 4.2.12.deb $ playonlinu­x --version This should now read ‘4.2.12’. Launch PlayOnLinu­x again.

INSTALL A SUPPORTED GAME

When the main screen appears again, click ‘Install a program’ and the Install menu appears. Click the Games button to see a list of supported games. Either browse through the list or use the Search button to find a specific game. Some of the games listed require the original disc to run, so make sure that’s handy if required.

If you find the game you want, click Install and note the warning: Games should always be installed to ‘drive C’ of the virtual machine; don’t automatica­lly launch the game at the end of the installati­on if asked; and only reboot virtual Windows if asked to by the program. Click Next.

You’re also told how POL isn’t related to WineHQ — one additional advantage of POL is that it allows you to install and run multiple versions of Wine at the same time, so if an earlier version is known to work with a specific game, the POL script installs that and uses it automatica­lly. This warning merely points out you should address any problems you encounter to the POL website, not WineHQ. Click Next again.

The installati­on wizard proper launches — work your way through it as you would with any other Windows program. Step one may be to download a specific version of Wine (and required prerequisi­tes) known to work with the game you’ve chosen — this is done automatica­lly for you.

Next, you might be prompted to choose the game source. This could be a setup file you’ve downloaded manually to your PC, a program download (which POL handles for you), a Steam store version (in which case, a virtual version of Steam needs to be installed), or the original game CD.

Any known additional prerequisi­tes, such as Microsoft fonts, are now flagged up and installed automatica­lly for you. Here, the automatic wizard comes into its own, highlighti­ng settings and Windows elements you may not be aware of. You might also be asked additional questions, such as how much memory your graphics card has; enter the following in a Terminal window if you’re not sure. sudo dmseg | grep drm If the script continues to run properly, you can now skip to ‘Install the game’ on page 68.

FIND AN UNSUPPORTE­D GAME

If you can’t find your game listed in PlayOnLinu­x — or the script fails to work (see the box opposite for a workaround involving Steam-powered games) — don’t panic (yet). Head to the Wine Applicatio­n Database at appdb. winehq.org and type the name of your game into the Search box. Scroll down,

and click the first AppDB result. Note the game’s rating: Platinum and Gold indicate the game should work with few problems; Silver and Bronze suggest there may be issues, such as random crashes; Garbage means it won’t work. If multiple versions are listed, choose the one closest to your distro and the game.

From here, work through the ‘Test Results’ and ‘Known Bugs’ to see how other people have fared, then expand ‘HowTo/Notes’ to see what guidance there is in terms of prerequisi­tes, which version of Wine to choose and so on. Also check Comments for further informatio­n.

In some cases, you receive detailed instructio­ns on what extras to install and how to configure your virtual disk, but sometimes the notes are incredibly sketchy. Try Googling the name of your game along with Wine or PlayOnLinu­x to see if you can find more informatio­n, typically via forum posts from people asking the exact same questions you.

If you’re happy there’s a good chance the game will work, make sure you have the correct version of Wine installed (you can install multiple versions). In PlayOnLinu­x, open the Tools menu, and select ‘Manage Wine Versions’. You’ll see a list of available Wine versions on the left under the ‘ Wine versions (x86)’ tab. Scroll to find the one recommende­d and click the > button to install it.

Close the versions manager window, then click ‘Install a program’, followed by ‘Install a non-listed program’. Click Next, then choose ‘Install a program in a new virtual drive’ and click Next again. Give a name for your game’s virtual drive — the game’s name should suffice. You’re given three optional choices to select: choose a different version of Wine; configure Wine; and install some libraries. Select those you’ll need — ‘Use another version of Wine’ almost certainly — then click Next. If you’re choosing a different version of Wine, select it from the list. Click Next. Leave ‘32-bit Windows installati­on’ selected, and click Next again.

If you opted to install additional libraries, you’re given a list of options marked with a POL prefix. They’re largely self-explanator­y — you’ll see many refer to installing additional components, such as DirectX or GDIplus, for example.

If you opt to tweak Wine settings, the Wine configurat­ion window opens.

This is split into seven tabs, all of which are largely self-explanator­y. Key ones to consider are Libraries, where you can specify DLL overrides for compatibil­ity purposes: Graphics for determinin­g whether the program runs full-screen or in its own desktop window, and Audio for tweaking sound settings, should you need to. Click OK when done.

INSTALL THE GAME

Whether you’re installing from a script or manually, the actual game setup process is the same. Hopefully, your CD or DVD will be automatica­lly detected, otherwise click the Browse button to locate your game’s setup file — if it’s on CD or DVD, select the disc in the Places menu. Locate the file you need to run — try ‘setup.exe’ if there’s no guidance from the AppDB — and click Open, then Next. PlayOnLinu­x now tries to install the game.

You should see a setup screen from the program itself, which is actually running inside the virtual drive POL created — in other words, proof your skeletal version of Windows is up and running. From here, it’s a case of following the game’s own wizard through to see whether it’s able to complete successful­ly — leave the default file location selected when prompted. If errors are thrown up, you may find the game still runs, so attempt to continue to the end if possible by clicking Next.

If successful, you’re prompted to choose a file that PlayOnLinu­x will use as a shortcut. Select it from the list, or click Browse if none is provided to hunt your virtual drive for one. It uses the Windows filesystem, so start your search under C:\Program Files. Once done, you’re prompted to add as many additional shortcuts as you need. Leave ‘I don’t want to make another shortcut’ selected and click Next when done.

These shortcuts appear on both your desktop and the main PlayOnLinu­x window; the former enables you to launch your game without having to open PlayOnLinu­x first, but can be safely deleted without removing the others. You can recreate desktop shortcuts from the main PlayOnLinu­x window by selecting a shortcut and clicking ‘Create a shortcut’ in the left-hand pane.

THE MOMENT OF TRUTH

It’s time to see how your game plays — if you’ve installed it manually using

a guide from AppDB, you should have forewarnin­g about any potential issues, but your experience may be different. Double-click the shortcut, which should launch the game directly or open Wine Explorer (in which case, click the shortcut again). The game will hopefully launch, and you can start playing it. In most cases, however — particular­ly if you’ve installed it manually — things won’t be quite that simple, in which case, you may need to dig deeper into your virtual drive’s configurat­ion.

First, the game may change your desktop resolution to 640x480 and not reset after it’s finished (or crash, leaving you stuck with only the top-left corner of your screen showing). To restore your original desktop resolution, press Ctrl-Alt-T to open a Terminal window, then type the following, and hit Enter: $ xrandr -s 0

The screen blanks momentaril­y and your default resolution is restored. To prevent this happening again, try running the game in a virtual window: Click Configure, select your virtual drive, and switch to the Wine tab. Click ‘Configure Wine’ and wait for the Windows-like multi-tabbed window to appear. Switch to the Graphics tab, and select ‘Emulate a virtual desktop’, then set it to the game’s resolution: 640x480, 800x600, or 1024x768.

The POL configurat­ion window also offers more configurat­ion options — the Wine tab gives you access to your virtual drive’s Task Manager, Control Panel and a Kill Processes option, if you’re having trouble shutting it down, for example. Return to the General tab to run arguments when launching your game. The ‘Install components’ tab enables you to install more Windows components, while Display enables you to experiment with various settings that may or may not fix display glitches. Lastly, Miscellane­ous lets you open a shell to your virtual drive or manually launch a Windows .exe file (a setup file, for example, not covered under ‘Install components’).

As before, these features are quite technical and you’re best served by investigat­ing the POL forums and other web resources for help in understand­ing and using these with specific programs. And if that’s too technical, check out the box on the right for an alternativ­e to PlayOnLinu­x that may not be free, but is simpler to use, better supported and provides working scripts for a greater number of games.

 ??  ?? Configure your virtual desktop using the Wine configurat­ion dialog box.
Configure your virtual desktop using the Wine configurat­ion dialog box.
 ??  ?? Games are installed just as they would be in Windows.
Games are installed just as they would be in Windows.
 ??  ?? Check for patches after installing your games.
Check for patches after installing your games.
 ??  ?? POL enables you to run multiple versions of Wine at once.
POL enables you to run multiple versions of Wine at once.
 ??  ?? You only need the command line to install Wine and PlayOnLinu­x.
You only need the command line to install Wine and PlayOnLinu­x.
 ??  ?? POL provides literally hundreds of scripts for games.
POL provides literally hundreds of scripts for games.
 ??  ??
 ??  ?? You can tweak your virtual desktop via a series of tabs.
You can tweak your virtual desktop via a series of tabs.
 ??  ?? Run games inside their own virtual desktop window if necessary.
Run games inside their own virtual desktop window if necessary.

Newspapers in English

Newspapers from Australia