Over the last little while, I’ve written or researched a few little things to make my life as a Linux-using player of GOG.com games a bit simpler. As such, I thought I’d share them.
This Greasemonkey script adds the unread count for your favourited forum threads to the favicon so you can select “Pin Tab” and have an alternative to manually polling for new replies.
It’s not RSS, but it still takes a load off your mind.
While not specifically focused on GOG.com or even gaming, this multi-mode script has proven very useful.
Modes of operation: --all-external Show all symlinks targeted outside the current directory --all-home Show all symlinks targeted inside /home --all-my-home Show all symlinks targeted inside the current user's home directory (anything else) Show all broken symlinks originating inside the current directory
I originally wrote it because:
- Some of my Linux-native ports store their save files in the game’s application folder
- I symlinked the save files into my homedir so nightly backups cover them
- My games folder is on an external USB drive
- Supposing I ever want to let a friend try the games on their computer, I’ll need a way to identify the folders I need to
mkdir -pto unbreak the symlinks.
Caution: It’s a bit of a hack and will get confused by folder/filenames containing newlines. (Doing it properly and efficiently is very awkward and painful without reinventing
/usr/bin/find in something with more support for structured data than shell scripting.)
aptitude search ~o
A quick explanation of “aptitude” for Ubuntu users:
- Debian invented
apt-getdidn’t get the lovin’ it deserved
aptitudewas invented as an
apt-getthat doesn’t suck and Debian decided to include it in the base install.
- The more popular aspects of
aptitudeeventually got added to
- Ubuntu decided that
apt-getwas enough and you have to
sudo apt-get install aptitudeif you want it.
Basically, aptitude is apt-get on steroids.
aptitude search ~o do? It lists all installed packages which aren’t backed by a repository. (Packages you installed using
dpkg -i or
gdebi, packages which are still installed after you removed the PPA, etc.)
I used it to identify which Humble Bundle games had been installed as
.debs so I could replace them with tarballs and move them to my new games drive.
UPDATE #1 …
A simple GTK+ GUI for lgogdownloader that I wrote so Linux users could take advantage of GOG’s
A tool for unpacking GOG’s new MojoSetup-based Linux installers without running any 3rd-party code.
(eg. Good for scripting the extraction of DOSBox- or ScummVM-based games for use with your non-x86 DOSBox or ScummVM install.)
Includes a proof-of-concept script demonstrating how to automatically download a game’s Linux build and then convert the installer to a cleaned-up Zip file. (Since MojoSetup already uses a Zip file internally to store the game so the file permissions are already constrained to what Zip’s support for POSIX permissions can represent.)
UPDATE #2 …
6. How to use overlayfs to force games to separate out stuff you want to back up
While many native Linux games are well-behaved and cleanly separate out their save files, some games (some native, some DOSBox-wrapped DOS games, and some in Wine prefixes rendered self-contained to keep games from scribbling all over $HOME) aren’t so helpful.
Rather than fighting with symlinks and permissions, the simple, easy, and proper solution is to use an overlay filesystem so that any changes made after installation will be redirected into a folder covered by your backup system and the game won’t even realize anything’s changed.
Historically, Linux has had various overlay filesystems, like unionfs and aufs, but they haven’t made it into the mainline kernel. UnionFS (in Ubuntu patchsets since 11.10 and mainlined in kernel 3.18) changes that.
Just cook up an OverlayFS mount command like this and you’re ready to go.
sudo mount -t overlayfs -o lowerdir=/mnt/buffalo_ext/games_inst,upperdir=~/.local/share/games/ overlayfs /mnt/buffalo_ext/games_play
lowerdir is where you install your games to.
upperdir is where files created/modified after install will end up. That last path on the line is where you run your games from.)