Sunday, December 16, 2012

A gamer's guide on how to install linux

Summary: You do not have to read everything in this guide, just the summaries.
Although he's the Linux mascot, I've never
seen this guy on a distro image...
With Steam coming to Linux, the open source platform is becoming ever more attractive to gamers. I was able to figure out Linux, mostly because I studied computer sciences (I had to) and I have enough patience to actually read all the manuals out there.

A lot of people are not in my position and therefore do not try Linux. It's scary for them, because they do not know what they are getting themselves into. There is no need for them to sink that much time in trying to learn Linux, because they can just as easily sink money in Windows and Mac to have a working computer. This is a shame, because Linux can be easily explained and learned.

I made this guide to be as complete and clear and yet as short as possible with the focus on gaming. I did this for 3 reasons: (1) We gamers are not known for our attention span, (2) when I started out I was annoyed by the walls of text and slow youtube movies that wasted my time trying to help me with very simple actions and (3) when you've finally got something to work, you'd want to wind down with a game, right?

Not counting the intro, I've divided this guide in 4 parts: getting, installing, using and gaming (in) Linux. I summarized every part in a small "Too Long; Didn't Read" at the beginning of every part, for when you just want to 'get on with it'.

This tutorial assumes you know how to burn a disc image to a DVD, how to change the boot order on your motherboard and what a hard disk partition is. We will focus on making a Linux-Windows dual-boot, so that if you are having trouble getting your games to run on Linux, you can always switch back without reinstalling.

0 - Before we start: Is Linux for you?

Summary: Take some time to dive into Linux.
Let's take some game analogies to see if you are fit to use Linux. As with anything in life, Linux is not for everybody. You have to be prepared to tweak your system a bit to satisfy your needs, as no distro will cater exactly to what you want. Fortunately, you can also do this in games.

If you are an avid Minecraft or World Of Warcraft player, do not think twice, you are probably going to like Linux. These games are pretty console-line heavy when you want to enjoy them to the fullest. If you have used the console in ANY game without too much trouble, you have tackled the biggest Linux hurdle: the terminal.

You do not need to be very command-creative to be able to like Linux. If you've ever made a custom level or tweaked your game's files to cheat a little, you've still got the right mindset. Linux will not try to sell you its features Instead YOU have to actively search for them. You need to want to try stretching what you can do with your operating system.

Do NOT attempt Linux if you are scared of exploration and the accompanied potential failure. Learning Linux comes with trial and error. You will probably ruin a computer (or virtual machine, more on that later) when trying out Linux. If this is the case, let me fix that for you: don't be scared, mistakes are normal. There, now everyone can try Linux.

1 - Getting Linux

Summary: Download an Ubuntu disc image here. If you tried it and don't like it, move to another distro. Check for an overview of other distro's at distrowatch.
The current Ubuntu logo
My first mistake with Linux was expecting I could type "download Linux" in Google and start right away. There is not just one Linux (although technically they all have the same kernel). There are countless different distributions (distro for short) and versions. They all have a different community and their composition can vary A LOT. If you thought the difference between Windows 98 and XP was large, just wait until you compare Arch and Debian.

This list gives you an idea of what you can expect.
  • Ubuntu; You'll hear most about this one. It has the biggest marketing campaign and claims to be the most user-friendly. It has great support, but as of writing people are not being too happy with the new interface. That's okay, since there are a lot of different versions with a different interface, like Kubuntu, Xubuntu and Lubuntu.
  • openSUSE; A linux distro especially made for the corporate world. It's nice but you will notice it assumes your computer will be used by more than one person. It will ask for your password more often than Ubuntu and its community is not very focused on media and gaming.
  • Arch; For the more experienced Linux user who wants to do anything to his/her distro, this one keeps it down on the safety-mechanisms. If you've got leading edge and cutting edge, Arch is bleeding edge. It comes with the warning that you should not update 24 hours prior to a moment when you really need your computer. An alternative to Arch is Gentoo.
  • Fedora; Fedora tries to be a bit more safe with the bleeding edge. Every version of Fedora has a stable core and tries to test new bits on that core. If something is broken, wait for the next update and it should work again. It's a lot of fun if you want to try new stuff, but do not want to get stuck fixing everything yourself.
  • Sabayon; Some distro's want to be original, some just take an existing distro and dump it full of packages to give you a complete out-of-the-box experience. Sabayon is one of those distro's. It has 3 versions of every kind of program you could think of and is mainly a big pile of packages. Other distro's in this genre are Poseidon and Ultimate Edition.
  • Puppy; Some times you need a small OS for a small hard drive. That's where minimal distro's are for. Puppy linux is not the smallest and definitely not the prettiest, but still the most popular with just 100MB needed for install. Other examples are SliTaz and Damn Small Linux.
  • Mint; I currently use Mint to write this post, so I can't leave it off the list. ;) It's based on Ubuntu (which in turn is based of Debian) and focuses on having a stable OS with a nice interface.
I have used all these distro's at least once, but there are a lot more available out there. Check distrowatch for more distro's and experiment for yourself! If you want to know which distro's are similar, check this distro map from wikipedia.

2 - Installing Linux

Summary: Try out your distro in a live environment and practice installing Linux on an empty partition next to Windows on an old computer or in Oracle VB. When you use it on your main or old computer, burn Ubuntu on DVD-RW, boot from said DVD and follow instructions on screen.
It's not the installing of Linux that is the hard part, it's the preparation. Before you even think of installing Linux to your main computer, I recommend you practice on an old computer. If you do not have or want an extra computer lying around, you should practice on a Virtual Machine, like Oracle Virtual Box.

VM's are nice, because you can install from a disc image straight to a virtual computer. Unless you are using a VM, I suggest you stock up on some rewritable DVD's and burn some of your favourite distro's on them. Re-use the discs of distro's you don't like or are out-dated. Do not use recordables, I found out you will run out of them very soon.

It's also possible to burn a distro image to USB stick, but be aware that not all distro images can be booted when burned to USB and that not all (old) computers can boot from USB. Most distro images are hybrids (USB and CD) and there are ways to get disc-only images on USB drive (like LiLi and Pendrive linux), BUT save yourself a hassle and just burn to DVD.

Before you start to install Linux next to Windows, make sure you've got an empty partition. It will be wiped. Back up all the data from that partition. Next make sure your computer or VM boots from your DVD drive before the hard disk. Now you're good to go.

IMPORTANT PART: Installing Linux is relatively easy: Insert disc (or load image in VM), wait until the installing environment starts up and follow the signs saying "Install <distro name>." Note that most distro's have a live environment in which you can try out the distro without installing. 

Usually Linux installs make sure it can be installed next to Windows, Windows doesn't, so make sure Windows is installed first. You can still fix the Master Boot Record if Windows is installed first, but save yourself the trouble.

3 - Using Linux

Summary: Linux is not Windows. Be prepared, but if you read only the summaries, have fun exploring! No, seriously, have fun!
If you think you know how an operating system works because you know Windows in and out, you might get yourself in a pinch. Windows is not like Linux, but you can still learn to use it without too much trouble. Go explore for yourself, it's fun. If you want me to hold your hand, here is a list of things that are a bit different.
  • Interface; Where Windows has just one kind of point and click interface per version, Linux has room for more than just one per install. If you don't like the interface of your distro, just install another one and select it when you log in. The most used ones are KDE and Gnome, but if you don't like them you can go to XFCE, LXDE, Cinnamon or MATE.
  • Terminal (command line); A common story about Linux is that you have to use the terminal. This is not entirely true. You do not have to use the terminal, but if you know your way around with it, it saves you a lot of headache. It is the difference between strolling through menus searching for that one button that solves your problem (visual interface) and just telling the computer what you want (terminal). Here is a list of useful commands and if any of them don't work, try 'sudo <command here>'.
  • Directory structure; Forget everything you know about drive letters and the windows directory structure. Chances are your data is cluttered around it on stations, like D:\, E:\, and so forth and your OS is installed in C:\windows\ and all other stuff . Linux on the other hand is installed in /. Your 'my documents' are available in /home/<user name>/. Your other drives with games and movies are only available if you 'mount' them to a directory. Usually these drives are mounted to /media/<drive name> or /mnt/<drive name>/. Note that Linux uses forward slashes for directories instead of back-slashes.
  • File system; Just so you know, Windows can't read the Linux file systems (ext2, ext3, ext4), but Linux can read Windows's (FAT32, NTFS). That's also why a partition gets wiped when you install Linux on it.
  • Installing software; Linux works a bit different with installing new software. These are the 3 main ways of installing software ordered by ease of use.
    • Repository; Think of an app store on your smartphone as a paid-for repository. Note: Linux had repositories decades before Apple came with their app store. The repository holds an online storage of all packages that have been compiled especially for your distro. You can use a package manager, like synaptic or pacman, to search and install packages from your repository. They will not always be up-to-date, though.
    • Binaries; If the (version of a) package is not available from your repository, you can download binaries from a website. Depending on your distro, these are files with a .deb (Ubuntu and Debian based) or .rpm extension (for distro's like Fedora, SUSE and other Red Hat based). The package manager will handle them and needed dependancies for you.
    • Compile from source; This means you get the program's code and build it for your distro yourself. Use a terminal for this! Download the code, unzip and execute the soon-to-be familiar dance of "./configure; make; make install" in the code's main directory. Make sure you can satisfy all dependancies yourself!
  • Drivers; As with the terminal story, the driver story is partially true. Not every piece of hardware is compatible with Linux. The newest hardware always takes a while before it is usable in your Linux distro and some developers do not even bother with Linux. That said, since the switch from Windows XP to Vista a lot of hardware suddenly is not compatible with Windows anymore. However, the hardware that was compatible with Linux has stayed compatible. I've already found some (not even that) old hardware that works instantly with Linux, but not with Windows 7. If you want to know if a piece of hardware, like a printer, is compatible with Linux, google its driver before buying.

4 - Gaming on Linux

Summary: It's like modding, just a little bit different.
This will be your best
friend when using Linux
Since this is a gaming blog, I will not go into detail with utilities like LibreOffice or GIMP. Most utilities will be pre-installed with your distro or available in your repositories anyway.

I have to be honest here. Gaming will not be as easy on linux as it is on windows. It is possible to run all your windows games on linux after some fiddling about. However, if you want to wind down and enjoy a new game, you might not want to tweak with linux for an hour. Here's where a lin-win dual boot might come in handy. That said, the Linux games market share is growing very fast since Desura, Steam and indy developers are more and more releasing their games for linux.

Here's a list to get you started on running games on Linux:
  • WINE; Wine is an abstract program interface that lets you run MS Windows programs on linux and mac. Just open any .exe with wine and it is most likely to run. Wine is usually available in repositories, but it might be better to get the latest version from their site. Be careful! Some cheat detectors in multiplayer games might classify Wine as a cheating program of sorts.
  • DOSBOX; Your favourite DOS emulator works just as well in linux as in windows. Play almost all DOS PC games released ever!
  • SCUMMVM; Play all your favourite old point and click adventures.
  • Desura; It's quite rare to find games released natively for Linux. This site does not cater to Linux games exclusively, but it has quite a lot of native Linux games.
  • Open Source games and engines; Some games are paid, some are completely open source. You repository is full of them. These are some notable open source, moddable games.
    • Sauerbraten; The Unreal engine of Linux. First person shooter with quite a community
    • Spring Engine; A RTS engine based on the design of Total Annihilation. Many mods are available giving you quite a couple of RTS games to play.
    • Doom; Look in your repositories, the original developers at Id left you a present. You need the original files to play.
    • OpenRA; Command and Conquer on Linux. It even works with the files of the original C&C and Red Alert.
    • OpenTTD; Transport Tycoon Deluxe, updated with a community, multiplayer modes and HUGE environments. Original files not needed to play, but still optional.
  • Console emulators; Console emulators are in a bit of a moral gray area, since console published games were not meant to be copied. Still, it is your right by law to do with your old games as you like and luckily Linux has enough emulators to let you play thousands of games with little effort.
    • Mednafen; An emulator that successfully emulates almost every console up to 1995 plus some more. Most likely to be in your repository.
    • Gens; One of the better Sega Genesis/Megadrive emulator
    • ZSNES; If you've emulated SNES in windows, ZSNES will be familiar to you. It's in your repository.
    • Mupen64; Great Nintendo 64 emulator. Not in your repository.
    • PCSX/PCSX2; Emulate Playstation 1 and 2. If they run slow, make an image of the disc.
    • GMAMEUI/Advance MAME; The Multiple Arcade Machine Emulator is available on linux in many forms. These two versions were easiest to use for me.
  • Steam; Valve's Steam is now available for Linux. Some avid Linux users don't want it on Linux because it is a kind of DRM and it would close down the system. While they might have a point, I still like Steam's service and it will bring games to the Linux platform, so it is on this list.

5 - So now what?

Summary: We're done, go enjoy your system
If I missed something or things have changed since writing, please let me know in the comments. Most of this post is quite general, but I will try and update this post when necessary.

And that's about it. This should give you enough pointers to work with Linux and install games on it. If things don't work out, remember Google is your friend and someone somewhere might have had the same problem. The communities are big, you will not be left out.

No comments:

Post a Comment

Post a Comment