I’m Still Alive

Posted by HokieTux on November 19, 2008 in General, News

This is really just a ‘ping’ post to say that this site is still up and I plan on getting back to it as soon as I can.  This semester, the last of my time as an undergraduate, has been extraordinarily rough in terms of coursework.  I have had just about no time to do anything but work, and so updating this blog and website quickly got put on the back-burner.

As of start of classes in January, I will be a GRA here at Virginia Tech, pursuing my Masters in Computer Engineering.  I very much hope to have more time to keep this site updated with new, useful material.

So, I’m Still Alive, and I’ll be back soon!

Read the entire post...

1 Comment »

Fix: OS X’s ’self-assigned IP’ Problem

Posted by HokieTux on August 4, 2008 in Hacks

I recently came back to my old man’s place for a couple of days before we headed out on a vacation, and quickly discovered that my Macbook wouldn’t play nicely with his wireless network.  My sister has an iMac that she struggled to make work with the wireless, but had forgotten what she had done to get it up and running.

The issue was that when I connected to the network, I had no actual internet access.  I had an IP, and I could ping the router, but I couldn’t get anywhere else.  Looking in network preferences, it said:

Airport has a self-assigned IP address and may not be able to connect to the internet.

I spent a good amount of time searching around online and digging through forums for a good fix.  There seem to be a lot of different solutions out there, each of which work for a small percentage of the people with this problem.

The fix that ended up working for me was thus:

Add a ‘$‘ to the beginning of the WEP password.

No joke.  I deleted the wireless network from the Airport preferences, reconnected to it, and prefaced the password with a dollar-sign… and it worked.

I hope this fix works for someone else out there with this problem.  I also hope that Apple gets their shit together and fixes their broken network stack.  OS X’s networking stack has always been weak, and Leopard was supposed to change all of that.  I love my Mac, but come’on Apple - you can do better than this.

Helpful Threads If This Didn’t Work:

  • http://forums.macrumors.com/showthread.php?t=429435
  • http://discussions.apple.com/thread.jspa?threadID=1111788&tstart=0
  • http://ryanjbonnell.com/journal/self-assigned

Read the entire post...

No Comments »

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.  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 with a composite engine running (Compiz-Fusion, for example).  So make sure you turn it off if you have it running.  You might also need to disable the composite extension in your Xorg configuration file.  Edit /etc/X11/xorg.conf (as root, obviously), and add the following:

Section "Extensions"
    Option "Composite" "Disable"
EndSection

Or, if it already exists, make sure it says “Disable” rather than “Enable”.  You’ll then need to restart your Xserver, which you can do by pressing CTRL-ALT-BACKSPACE.

7) Now then, in order to run the game, you need to tell the executable where some libraries are.  Some people only need to point to the Loki_Compat libraries, but I kept getting the following error:

/usr/local/games/smac/smacx.dynamic: symbol lookup error:
/usr/local/games/smac/smacx.dynamic: undefined symbol:
XGetWindowAttributes

If you get this error, then you also need to link to the X11 libraries.  To run the game, execute this command:

For Alpha Centauri (original):

LD_PRELOAD=/usr/local/games/smac/Loki_Compat/libstdc++-3-libc6.2-2-2.10.0.so:/usr/lib/libX11.so
/usr/local/games/smac/smac.dynamic

For Alien Crossfire:

LD_PRELOAD=/usr/local/games/smac/Loki_Compat/libstdc++-3-libc6.2-2-2.10.0.so:/usr/lib/libX11.so
/usr/local/games/smac/smacx.dynamic

Obviously, if you put the Loki_Compat directory somewhere else, then you will need to change the linker location.  The same goes if you changed the default install location.  That’s it!  You should be up and running!

If you run into problems, post here and I’ll try to help you out!  Or, if this guide helped you out, post and let me know!

Further Tweaks

For further tweaking, check out ~/.loki/smac/Alpha_Centauri.ini.  If you read through the README or Google around, you can find a lot of cool hacks (changing the resolution, for example, or running the game in windowed mode).

References

Read the entire post...

2 Comments »

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:

Thanks to the fellow Arch users out there (especially those in that first thread) that helped me figure this out, and happy torrenting! Cheers!

Read the entire post...

6 Comments »

Fried Computer, Updates

Posted by HokieTux on June 29, 2008 in General, News

Well, as it turns out, my video card wasn’t only suicidal, but somewhat murderous.  It would appear that when it went boom (see my previous post), it took the rest of my machine with it.

I know two other people that have had the same type of video card, and theirs both exploded as well.  Given this, I’m going to go ahead and say that you should steer clear of EVGA’s 7600 GT line.  They are rather aged now anyways, but if you are building a low system, make sure you avoid this line of products.

Unfortunately, I don’t think I can simply buy a couple of replacement parts for the machine and be done with it… I’m really not sure of which exact components are fried, but my suspicion is that the motherboard is dead.  At this point, it would be really difficult to find a replacement motherboard that I could reuse the rest of my components with since they weren’t exactly top-of-the-line when I bought them 2 years ago.  This leaves me in the position of being able to re-use my harddrive… and that’s pretty much it.  Even my PSU will need to be upgraded to handle a larger load given the power demands of newer components.

Not only did I lose my primary machine, but I’m now cut-off from my primary data drive.  My main storage is formatted as XFS, which is accessible easily on Linux systems, and from other machines via a Samba share that I had running on it.  However, now that the machine isn’t running anymore, I can’t access it.  I’ve desperately hoped for years that Apple would add ZFS/XFS support to OS X… but it hasn’t happened yet.

As far as articles go, I had promised a few people that the next post would be on zsh.  However, with my Linux machine out of commission, it will have to wait until I get replacement parts in and have it back up and running.

Well, wish me luck!

Read the entire post...

2 Comments »