Mat Munn

A web developer based in Melbourne, Australia

Mat Munn

My journey from Windows to Linux

Recently I became inspired to give up Windows and move to Linux. There were many benefits, it looks nicer, can run lighter, it’s free and it provides a better and more flexible development environment. There was just one thing holding me back - I occasionally like to play games on my PC. This caused problems for me, there was no native Linux version of my game of choice (World of Tanks) available for Linux and this was really all that was holding me back. Recently I learned of a way to get some programs and games working in Linux and so I decided to make the switch. Below is the process I went through to wind up with my current setup.

Before I settled on my distro I tried a few to find one that I liked. There were three main ones:

INSTALLING THE OS

Before I went and deleted all my old partitions from my Windows drive I had a play around with Ubuntu Gnome in a VirtualBox VM just to see if I really liked it. I found a base look that I liked and knew that I would be able to implement it when I moved my desktop OS to Ubuntu. I installed the Ubuntu Gnome image to a thumb drive using UNetbootin, restarted my computer and I was away. I chose to do updates through the installation process so installation took a little while longer than normal but after installation I was presented with a much more updated version than the CD image provided.

First things first, updating the remaining packages.

$ sudo apt-get update; sudo apt-get upgrade

Because I’m running an NVIDIA GTX 760 I wanted to get some proprietary drivers so that I could make the most of the card, including a better framerate when I got into the games. I decided to go with NVIDIA’s own drivers, available here (or here by putting in what sort of card you have). I downloaded the correct ones for my system and then had to go through quite the process to get them installed:

To modify video drivers you can’t have an X server running so press Ctrl+Alt+F1 and login as your user. Kill the current X server

$ sudo service gdm stop

Next you will need to remove any NVIDIA drivers the system installed.

$ sudo apt-get purge nvidia-*

Change to the directory where you downloaded the NVIDIA driver setup and issue:

$ sudo sh NVIDIA*

The above command will run the installer. Answer yes to all the prompts and the driver will install. It should also ask you if you wish to run nvidia-xconfig. Make sure you answer yes to this so your X server is configured to use your new graphics driver. I had much trouble with this and it took me a lot of googling and reading many random articles to figure out how to get it all working, hopefully these instructions work for you as well.

After completing the above you should restart your computer by typing $ sudo reboot.

DEVELOPMENT

For my development environment I use a good text editor and the terminal a lot. My favourite text editor at the moment is Sublime Text, and as the name suggests it is sublime. I am currently using version 3 and the installer is available from the website.

To have a development environment we must have something to develop for. Go ahead and run the following:

$ sudo apt-get install php5 php5-mcrypt php5-json php5-mysql php5-gd mysql-server apache2 phpmyadmin php5-dev php5-curl

You don’t have to install phpMyAdmin but I just find it handy to have so that I can easily work with my MySQL databases. Jason Lewis wrote a small shell script to automatically create Virtual Hosts for Apache but I found that it didn’t work correctly for Ubuntu 13.10 so I forked it and fixed it, it is available here.

I also use Xdebug, just to make PHP error outputs a bit prettier and easy to read. The website is also able to generate you custom installation instructions if you paste the output of your phpinfo(); into this page.

Next you should download and install Composer.

$ curl -sS https://getcomposer.org/installer | php
$ mv composer.phar /usr/local/bin/composer

If you don’t have cURL installed you will need to install it with apt-get.

$ sudo apt-get install curl

GAMES

To get World of Tanks running on Linux I use PlayOnLinux, you can download it from here. Once installed I clicked the Install button and found World of Tanks in the list. Once the game is installed it will begin the update process, there may be a problem with this as the default update mode is through torrents. After many google searches it seemed that it was a common problem and the workaround is to click the spanner in the top right in the updater and then untick the box that says ‘Allow torrents’. After that the game should update properly. There are a couple more tweaks you can perform to get the game working better:

To speak with my friends playing games I also installed TeamSpeak. I installed TeamSpeak to ~/bin/TeamSpeak3-Client-linux_amd64 and then I had to make a .desktop file in /usr/share/applications.

[Desktop Entry]
Version=3.0.13.1
Name=TeamSpeak 3 Client
GenericName=TeamSpeak
Exec=/path/to/bin/TeamSpeak3-Client-linux_amd64/ts3client_runscript.sh
Terminal=false
X-MultipleArgs=false
Type=Application
Icon=/path/to/bin/TeamSpeak3-Client-linux_amd64/pluginsdk/docs/client_html/images/logo.png
StartupWMClass=TeamSpeak
StartupNotify=true

NICETIES

CONKY

When I was trialling CrunchBang I fell in love with an application called Conky. It is a highly configurable system monitor that can display all kinds of stats about your machine on your desktop. To install Conky all you have to do is issue:

$ sudo apt-get install conky

After installation open the file ~/.conkyrc in your preferred plaintext editor and play around with all the options. My .conkyrc file is available at https://gist.github.com/matmunn/9143677.

(Removed the image)

GNOME EXTENSIONS

There are a few things that GNOME doesn’t do so well or I wish were done a little bit differently, so I have used a few extensions to get a look I am pretty happy with. Extensions are available at https://extensions.gnome.org. Extensions that I use are: