July 2008
HowTo: Alpha Centauri on Linux
Posted by HokieTux on July 21, 2008 in Guides, Hacks
For the unacquainted, Alpha Centauri is one of the most acclaimed turn-based strategy games of all time. Released in 1999, it revolutionized strategy gaming and is still considered one of the best games ever made (look at any top 100 games of all time list, and you will likely see AC appear).
Before they shut their doors, Loki Software ported Alpha Centauri and it’s expansion, Alien Crossfire, to the Linux platform. Unfortunately, due to some library compatibility issues, the old release of Alpha Centauri will no longer work out-of-the-box on Linux. I discovered this when, feeling somewhat nostalgic, I decided to install it and fire it up. After a lot of searching and tinkering, I got it up and running almost perfectly. I still experience a little buzzing in the sound… but otherwise it’s excellent. Here is what I had to do to get it up and running:
Installing Alpha Centauri Planetary Pack
1) Obviously, make sure you have a copy of Loki Software’s Alpha Centauri Planetary Pack (ACPP) for Linux. These haven’t been in production for years, and are nearly impossible to find on the web. Indeed, I’ve seen them sell for hundreds of dollars on eBay… so if you don’t already have one (and since I’m in no way recommending any sort of illegal activity), you are probably shit-out-of-luck.
2) Install ACPP by running their installer script. When asked if you want to install the Loki Updater, say no (it doesn’t work). You will also be asked if you want to install the Loki Uninstaller… I haven’t tested this, so I have no idea whether or not it works. I’m not sure why it wouldn’t, but why bother? AC is bloody awesome. Also, make sure you install all content so you don’t need to have the CD in your machine to play (this came before all that shitty anti-piracy software).
3) Install the smac-6.0b-x86 patch. You can find it here: http://filebox.vt.edu/users/bhilburn/Public/smac-6.0b-x86.run. Just download it, set the executable flag with:
$ chmod +x smac-6.0b-x86.run
And then run it (as root):
# sh smac-6.0b-x86.run
4) Next, you will need to download and put the ‘Loki Compatible Libraries’ somewhere where AC can see them. You can find them on the Gentoo wiki, or here is a direct link: loki_compat_libs-1.3.tar.bz2. Unless you changed something, ACPP likely installed to /usr/local/games/smac. I recommend putting the ‘Loki_Compat’ directory that comes out of that tarball in that directory so you don’t lose track of it. So, for example, do:
$ tar jxvf loki_compat_libs-1.3.tar.bz2 # mv Loki_Compat /usr/local/games/smac
5) You likely need to change the ownership of your personal Loki directory since the installer likes to install it with root as the owner. This should do the trick:
# chown -R <your username> ~/.loki
6) Now, you can’t run the game…
HowTo: rtorrent & SSL certificates
Posted by HokieTux on July 13, 2008 in Hacks
Since Comcast decided to shove their heads up their fourth point-of-contact and muck with all torrent traffic (apparently not realizing that there are many legitimate uses for the protocol despite what the MPAA/RIAA would have everyone believe), using HTTPS announces with trackers has become a necessity if you are stuck with Comcast as an ISP. Unfortunately, getting this running with many clients isn’t always as easy as it should be. This post will focus on getting SSL certs working with rtorrent.
I’ve now run into problems with SSL certificates and rtorrent twice, and it has been a little different both times due to changing versions of rtorrent and the libraries it depends on. The first time I hit a problem, the error message was:
Peer certificate cannot be authenticated with known CA certificates
The second time, the error was:
problem with the SSL CA cert (path? access rights?)
Regardless, the fix was mostly the same. First, you need to get the SSL certificate from your tracker. You can use this bit of code to do the job:
# openssl s_client -connect <your tracker.com>:443 </dev/null 2>/dev/null | sed -n '/BEGIN CERTIFICATE/,/END CERTIFICATE/p' >> /etc/ssl/certs/ca-certificates.crt
You will need to put that all on one line in your terminal. Also, remember to replace <your tracker.com> with the base URL of your tracker. Also, if you run into an error where ca-certificates.crt doesn’t already exist, just use one ‘>’ near the end of that code line instead of ‘>>’ (the difference being that ‘>>’ appends to an already existing file, and ‘>’ will create the file).
Now, you need to rehash your certificates. Run:
# c_rehash
from your /etc/ssl/certs directory. You should be all set now. Verify that everything is working properly using curl:
$ curl -I --capath /etc/ssl/certs https://your_tracker.com
The next time you fire up rtorrent, you shouldn’t have any problems. If you do, then try starting rtorrent like this:
$ rtorrent -o http_capath=/etc/ssl/certs
If you still have problems, post a comment here and I will try to help you out. If you use Arch, you can also post there. Here are a couple of threads you might find useful:
- rtorrent error & ca certificate
- rtorrent certificates problem (this is actually a thread I started the first time I had the problem)
Thanks to the fellow Arch users out there (especially those in that first thread) that helped me figure this out, and happy torrenting! Cheers!