As you may know, GOG (Good Old Games), one of the new distributors of Linux games since the middle of this year, is preparing a full, multi-platform desktop client called GOG Galaxy to be released in the near future. But if you don’t want to wait and hate using the web page of GOG to download your games on Linux, there is a good alternative: a full reimplementation of the GOG API that’s already available as a command line client, called lgogdownloader. Let’s see how it works.
First, if you have Debian you can simply use apt-get lgogdownloader since it is now in the official repository. If you are on any other distribution, like Ubuntu or Mint, you do not have to worry too much. You can simply compile it from the latest sources, and there’s nothing difficult about it. Let me give here the instructions for Mint/Ubuntu, but the steps should be similar for other distros. First, install git in case you do not have it yet. I was shocked that Mint did not have it by default, by the way…
sudo apt-get install git
Then, go to a folder where you want to put the temporary files, and enter:
git clone https://github.com/Sude-/lgogdownloader.git
It will create a lgogdownloader directory and get all the required files. Now, you should install all the dependencies, and they are many of them:
sudo apt-get install build-essential libcurl4-openssl-dev liboauth-dev libjsoncpp-dev
libhtmlcxx-dev libboost-system-dev libboost-filesystem-dev libboost-regex-dev
libboost-program-options-dev libboost-date-time-dev libtinyxml-dev librhash-dev help2man
Note that the above libs may have different names if you are using a non Debian/Ubuntu/Mint distro, so you may need to adapt the command above to match their appropriate references.
Then, it’s time to compile the sources! Go in the lgogdownloader directory that was just created from git and type:
It will take a short while, and it should not give any error if all went well. Complete the installation with:
sudo make install
…and then you can call lgogdownloader from any terminal and any folder. Now let’s see on how to actually download stuff from GOG. You can first start by getting a list of titles you have on your GOG account:
It will first ask for your Email account and your GOG login password (only once!) and then you will get the list of your games. Let’s say you want to download all your Linux games, you simply need the following:
lgogdownloader --download --platform 4
If you want to download all your Windows games, replace 4 by 1 in the above command.
Downloading a specific game is super easy as well. No need to enter the full name, as long as you enter a string from the game name that’s unique, it will find it and download only that relevant game. Very practical.
For example, I can download Dungeon Keeper from my GOG library with the following command:
lgogdownloader --download --platform 1 --game keeper
And there I have it. It shows a nice progress bar as it downloads (and it downloads not just the game, but all the attached extras as well). Lgogdownload has many useful features that you probably want, such as checking automatically for updates in your GOG library, continue downloads that were interrupted, and much, much more…
What is great with the command line is that you are just one step away from running the games installer in WINE as well, once downloaded, with a simple command:
It takes you straight to the GOG Installer, and you will be playing the game just 5 minutes later. Awesome.
Honestly, who needs a GUI client, when?
Have fun with Lgogdownloader, and let me know in the comments if you have something to add.
At BoilingSteam, we strongly dislike ads and that is why you won't find any during your visit. If you like what we do, please consider supporting us on Patreon. You can also sign up to our newsletter (No Spam!), or our RSS feed or even Twitter.