The pains of PC gaming

There are times when one feels a bit of envy towards those that stick to console games. Always the same hardware, the only thing you choose is the game you want to play. Unfortunately, not all games are available on console. Not only that, but console games tend to be ridiculously expensive. So I am a PC gamer by necessity.

To make matters worse, my operating system is Linux, because it is simply better, and also it’s free. But my current laptop came pre-installed with Windows and the first thing I did was remove the hostile environment and install Ubuntu server with a KDE Plasma desktop. Most games dislike Linux, perhaps because Linux is the choice OS for programmers and programmers are good at analyzing game files and creating cheats, but more likely because they are getting paid by Microsoft to stay away from a better product.

Fortunately, there are ways to run games that are made for Windows even if you’re on Linux. Again, proof that Linux is just the better choice, because I don’t think the opposite is possible.

Proton

When you install Steam, they have a system called Proton that kind of works like a Windows emulator. You download a Windows installer for your game, in the Games menu choose Add a non-Steam game to my Library, and run the installer that way. Then you have to remove the installer from your library and add the actual game there in a similar fashion. Proton sometimes works better than the other options, so this might be the first thing to try.

Wine

WINE Is Not an Emulator. It does listen to requests that would be made on Windows and translates that request to something Linux can understand. It does not have a complete understanding of all the possible requests that Windows software might make, so it doesn’t always work. But you can try to just download an installer and run it with wine and see what happens. It might just work.

Lutris

The main benefit of Lutris is that they have some scripts prepared so you can do some particular settings of Wine that might be necessary to make things work. Lutris is a game collector, similar to Steam, but you go to their web page to find a script and run it to install whatever game you want to play. There is also a wiki on how to make sure you have drivers installed for your graphics card &c.

An example: World of Warcraft

GB is getting old enough to start playing some games, and I thought World of Warcraft might be a good place to start. A quick search told me that everyone who replied to people who had problems said “Just use Lutris”, so I used this as my first attempt. First time it didn’t work, but second go it just somehow installed despite no real changes made.

After letting GB level up a character, and doing some leveling myself, WoW dropped a new update. Or rather, some kind of pre-expansion of draconic or whatever. After the update, we could log in to look at our characters, but starting the game didn’t work. When I looked through the game settings, I saw that the options were all reset. One of the things that changed was that Direct3D 12 was used, and people seem to recommend using 11 so I changed that. Still didn’t work. So I tried various other things, but nothing worked.

After uninstalling the game as well as Battle.net I set about to reinstall, but nope that didn’t work. The battle.net installer just refused to run. At all. So after some tinkering I gave up and switched to Proton. That did work. For unexplained reasons.

Then I decided to try and get WoW on a second computer to see if we can play together. That is the whole point of an MMO anyway, isn’t it. So for the next computer I started with Proton; didn’t work. Lutris; didn’t work. Running wine Battle.net.setup.exe did however work. For unexplained reasons.

Installing WoW on two computers at the same time, with shared and limited bandwidth, takes 5 hours. So now we wait. I still don’t know if it will work. And starting to feel a bit annoyed about all the loops I have to jump through just because Blizzard is a shit company that don’t know how to support a good operating system. But there really isn’t much support for PC gaming, even among the games that are only available for PC. Weird business model, if you ask me.

Linux for writers

I tried to google for a linux setup used by writers, to find some inspiration on how to set up my work environment. The results I got from my search was quite disappointing. A few results on how to install linux, and a few about which apps to use that didn’t even mention the good ones. So now I’m writing down my own preferences, in case someone else wants to be inspired and stumbles onto this page.

How to install linux

What is linux? Most people buy a computer and just start using it. They never consider that there may be better ways of using the computer than the person who sold it to you had in mind. Think about it like this; let’s say that there were only two car manufacturers in the world. One of the car manufacturers is Ford and the other one is Honda. Most people would just choose between the reliable and high-tech Honda or the easy to repair and cheaper Ford. But regardless of what model you pick, what if there was a custom workshop where you could park your car for a night and next day take it out fully customized for what you want or need? Professional drivers would all have a custom, of that you can be sure. You can also be sure that Honda and Ford both would do what they can to keep custom cars from becoming popular, because competition is never good. Linux is the custom workshop for computers, and it’s all free (except for all the time you spend defining your customizations).

Linux is actually just the operating system. The operating system of Microsoft Windows is DOS, and you only ever see it if you open up the command prompt. Apple MacOS or OSX or whatever they call it these days is a Unix-derivative, similar to linux. Most people never realize that there is an operating system – you are interested in software, or apps, not how they function. On Windows you only have one setup, and at most you may be able to change the color scheme or desktop wallpaper. MacOS is similar in that regard, you don’t have a lot of options. After you install linux, there are lots of options to choose from. If you want your computer screen to look like a Windows environment, you install KDE-plasma desktop. If you want your screen to be more similar to MacOS, then you install Gnome. But there are several other desktop environments that are more or less in between those two options. And this is just the beginning of all the choices you can make; there are tons of different web browsers, file managers, office apps, &c. Since most people want kind of similar setups, all of these choices are bundled in so called distributions. So the first thing you should do is select which distribution to use.

If you want to choose every single thing, then you should go with the Linux-from-scratch distribution, or Gentoo, or Funtoo. You will spend a lot of time reading about all the different software components and how they interact, make a lot of mistakes, and learn from it. In the end of a very long process, you will have a computer screen entirely defined by yourself according to your own preferences, and if you make the right choices it will be the fastest computer you can have within your hardware limitations.

If you just want the easiest thing to start out with as a beginner, and then learn something about how to customize it every now and then, you should choose the Ubuntu distribution (with Gnome which looks like MacOS) or Kubuntu (with KDE-plasma which looks like Windows).

My own preference is to install ubuntu server, which just gives me a functioning computer with a terminal (or command prompt). If I’m on a fairly new computer I then install the KDE-plasma desktop windows-environment like this:

sudo apt install kde-plasma-desktop

If I’m on an older computer that runs slowly with less resources, or for example a Raspberry Pi, then I instead install the LxQt desktop environment like this:

sudo apt install lubuntu-desktop

After that you just restart the computer and login with your username and password. You will then have a package manager or software center or similar where you can install apps. Or you can open a terminal and type the “sudo apt install XXX” where XXX is the name of the software you want to install. If you don’t know the name exactly, you can try to type the first few letters and then press tab once. If there is only one package that matches those letters in the beginning of the name, the terminal will finish typing the name correctly for you. If there are many packages that match the name you can press tab again (twice total) and get a list of all the matches. For example, if I type in the terminal “sudo apt install lubu” and then press tab, the terminal will change the text to “sudo apt install lubuntu-“. The hyphen at the end give me a hint that there are many packages with this name (the hyphen is not always there) so I press tab again and get a list of seven software packages and their names. Finish typing any one of those names to install that software package after you press enter. Or go the easy route and find the software center (on KDE it’s called Discover and looks like a shopping bag icon in the menu).

What software to install

Now this was meant to be for writers. The first writer-related software I install is Falkon, which is a really fast internet browser. After installing Falkon I change the search engine from the default (Duck-duck-go which sucks) to Google.

After Falkon, I install Thunderbird to handle my e-mail. Since I have used Thunderbird for many years, I export my profile with all my old mail from my previous computer (or from my backup if my previous computer is broken) and import it into Thunderbird. Otherwise you will need to setup all your e-mail accounts and other settings.

QGIS is next for me. I use maps in a variety of ways, but as a writer you can for example put layers for your characters to keep track of where they are in the world at what time. If you are working with Game-of-Thrones-like complexity of lots of characters and their whereabouts QGIS certainly makes it easier to check up on who is where in the world. Of course, if your world is not our real world you can’t start with OpenStreetMap as a background so you would have to start by drawing out all your geography first.

LibreOffice is very useful, even if I don’t use it much for writing. It will open word documents, excel sheets, and powerpoint presentations, or let you create such things. Obviously, you can just use LibreOffice Writer for your writing, but then you might as well use Google Documents online or something such.

Since I have my own Nextcloud server, I install the Nextcloud desktop software. This automatically creates backups of all my files as soon as I change something, even if it is as simple of adding a single word and then saving the document.

For my actual writing, I install TeXstudio. This also needs texlive and xetex. Setting up TeXstudio is a bit tricky, and I also have my own classes for the documents I produce (scientific articles, books, letters, &c) and writing those classes takes some time to do. Classes are kind of the same as templates in Word or LibreOffice Writer, but much more powerful. Writing text in TeXstudio is just like using Notepad or KWrite. It’s not formatted while you type, and you have to insert commands to make bold text or chapter headings. When you press F5 to compile your text, it produces a PDF-document which looks perfect and much nicer than what you can do with other word processors.

Gramps is a geneaology software to build your family tree, but can also obviously be used by writers to keep track of fictional family trees and relationships.

Other software to install

Darktable is nice for keeping track of photos and pictures. Krita and Gimp are nice for creating pictures, or Inkscape for vector images. If you want to go advanced with 3D or making your own movies then Blender is the best option. For movie editin Kdenlive is nice. There are many other options that you can find in the software center, but these are my favourites.

I usually install Steam, because it is nice to blow off some steam sometimes with a game. Cities: Skylines is my first choice for a game, but I also play with Prison Architect or RimWorld sometimes, or the occasional Crusader Kings. Trine is good with friends, or Don’t Starve Together. If you are a procrastinator, don’t bother with games because you will never get anything real done. If you don’t have Steam but want some simple relaxation, 0 AD, SuperTux, or KPat are good enough to make you forget the real world for a while.

HomeBank is one of my essentials to keep track of my finances. Again, there are many other options, but I have found HomeBank to work best for my circumstances.

Stellarium is nice, if you have a moment to enjoy the night sky and want to find out what is what up there.

WingIDE is my choice for python development. You may also want PostgreSQL with PostGIS so you can save your data from QGIS in a better way, but I put those on a separate server myself. Or install R if you want to run statistics on your data (with RKward as a GUI).

Audacious or SMplayer for listening to music, or LMMS for making your own music. OBS studio for making content to YouTube or similar services.

Then what?

Start writing. Or procrastinate and spend an infinite amount of time fine-tuning your system and trying out all the apps to find your own favourites. Did I mention all of this is available free of charge? Yes, well, that also makes it very expensive in terms of time since there is nothing stopping you from trying out all of it. Better to ignore the software center once you have your essentials, and just do some work.

Squashing bugs in Python

I’ve been working on a script that iterates through a rather massive Excel sheet using openpyxl. The Excel sheet has 26 tabs with pages of data cells in each tab.

Due to company policy, I used PyCharm. Not my favourite editor. Actually, I really dislike most things about PyCharm. But still, company policy. After squashing the first few bugs in my code, the debugger ran for 4 hours and then crashed due to some inexplicable memory overflow error. Tried some fixes, but had to go through the 4 hours of waiting again to get another inexplicable memory overflow in a slightly different place. So I put in some code for garbage collection, and deleted some variables after I didn’t use them to see if that would help memory. It did. 6 hours later, same crash but much later. Frustration.

Googled around and found someone mentioning WingWare. Fond memories of my days with WingIDE came to mind, back in version 3 (now 7). And lo and behold if they don’t offer a free version now, so I can ignore company policy and just install the free stuff. Badabing badaboom, 1½ hours later I got to the end of my code where WingIDE highlighted a bug for me. 75 % faster than PyCharm.

1½ hours is still a bit too long of a wait, and I am getting sick of jumping between things to do while waiting, so I have spent some time to partition my code to I am evaluating small parts first and then the whole. But it just struck me as kind of amazing that an IDE that is one of the most popular is so much slower than WingIDE. Since I also vastly favor the UI of Wing the choice is quite obvious for me, now that I know I have a choice.

Anyway, I figure since they saved me hours of my time, the least I can do is to advertise their product a bit. And I will be sure to try and find a way to source some cash for the full version. Finding out there is a free version I can just use really made my day, but I would prefer to have the full version.

PyCharmWingIDE
Debug entire process6 hours for 80%1.6 hours
Run script in python command lineN/A1 hour

Ubuntu 17.10

From 2005 to 2008 I was using Ubuntu quite a lot, and participated frequently on www.ubuntuforums.org with help and advice. As such, I was one part of the movement that made Ubuntu grow to the most popular Linux distribution.

What made me leave Ubuntu was my love for computer games, and the lacklustre office suite. So I moved back to Windows, specifically Windows 7. Then Windows 8 came out and it was total crap. A small jump to Windows 10 and it was beyond crap, it was an invasion of privacy where every user it treated as a point for data collection without any regard for personal integrity. CIA announced that they can easily connect to the webcam and microphone of any computer, which was immediately fixed in Linux and soon fixed in MacOS while Microsoft just said “we’re looking into this issue”. M$ probably put in that backdoor intentionally, would be my assumption. Not that Apple is doing any less data gathering and spying on their customers.

Linux is becoming the last bastion of freedom in the information society. Being open source is a crucial part of maintaining this freedom, since anyone can see what the operating system is doing (if you have the skill to read and understand code). However, many Linux distributions are delivering pre-built binary packages, so while it is open source in principle, most users have no idea what is in those packages.

The big Linux distributions are also taking many steps to make Linux more like Windows, which in my book is making Linux a lot worse by design. Systemd is the first problem in this, where lots of functionality is bundled together in this huge blob that you cannot modify easily, and then Gnome and other software packages start to require that huge blob. In Ubuntu 17.10 they will stop using a partition for swap and instead use a swap file, like Windows has been doing for ages. There is some reasoning behind this; the end user is too stupid to know what to do, so design something to prevent stupidity from causing too much harm. But the effect is really that you introduce something stupid to combat stupidity.

For the past year or so, I have been using the Funtoo distribution almost exclusively. I’m making quick dips over to Windows in order to print something on our network printer at work, but otherwise I’m 100 % Funtoo Linux. The thing I love about Funtoo is the package manager from Gentoo (portage / emerge) which builds everything from source and also lets the user define if there is anything they don’t want to use. OpenRC is used instead of systemd so there is complete modularity in the init system. Everything can be controlled in detail by the user so you can set your system up just the way you want it. And since you get your system just the way you want it, there is nothing to complain about or be frustrated about.

Except, there are some frustrations in Funtoo too. For example, the Funtoo community is very friendly, but it is also a very small community. It takes a while to get packages into the system. I wanted to install the Unity3D game editor, which has a client available as source code to build, but it just isn’t available. I wanted to use SageMath, but that was not an easy thing to do. Well, SageMath is moving toward some web interface instead of installing on individual computers so maybe that is fine anyway. I wanted to install an IDE for Python, but even though both Ninja IDE and Spyder are in the package manager, neither of them worked after installation and I’m not sure what I need to change to make it work. It is not uncommon for packages to have missing dependencies, so you have to find out yourself what is needed to make it work. Once you have a functional system with everything you need, Funtoo is by far the most excellent distribution you will come across, but I feel like the road to get a fully functional system is a bit long sometimes.

Ubuntu, meanwhile, are starting to offer Snaps or whatever it’s called. One package delivered with all the dependencies to ensure full functionality. More to download, but less issues when installing. The Ubuntu community is also huge, I’d say about 60 % or more of the entire Linux community is on Ubuntu, and with all the derivatives like Elementary OS and Linux Mint, it is probably even more than 60 %. A lot of this comes from the fact that Ubuntu is the default Linux distribution to come pre-installed when you buy a computer. Because the community is so big, there are lots of people working on hardware compatibility, enabling software packages, etc. This means that the road to a fully functional workstation is a lot shorter on Ubuntu.

What I don’t like about Ubuntu is that they don’t have a rolling release model. Because of this, every 6 months or so you have to re-install the entire system. Sometimes a dist-upgrade will work fine, but almost always you are better off to just re-install everything. With Funtoo and other distributions that have a rolling release model you just upgrade periodically package by package and deal with some minor issues with specific packages along the way. Rolling release is just so much better in the long term.

I have been going back and forth about this in my mind. Use Funtoo, because while it takes a while to set up it is so much better in the end. Or use Ubuntu, because it is so much easier to get fully functional that you can live with a few imperfections in the end result. In the end, there are some things that I don’t know if they will ever be available on Funtoo, like the Unity 3D Editor or the Unreal 4 Editor. Because of this, I am leaning towards leaving my perfect distribution and embracing the imperfect one, because of the availability of software.

It really sucks to leave Funtoo. I wish I had the time and resources to make sure that all the software I use is available there. If I had those resources, I would stick with Funtoo for sure. But in the end, what matters is being able to do the work I want to do. That work is possible to do on Ubuntu, but not always on Funtoo. So I will go for Ubuntu. Back to my roots. I’ve only been away for a decade.