<%= NewRelic::Agent.browser_timing_header rescue "" %>

David van Geest

Software, Life, and Stuff I Couldn't Find on the Internet

Using a VirtualBox host-only interface when bridged interface is unavailable

| Comments

On my current project, I use an Ubuntu Server virtual machine to run MySQL and Rails. It makes it easy to keep my development environments for conflicting projects separate… my previous project used a different version of both MySQL and Rails. For Ruby and Rails, this problem can be solved with RVM, but that’s another story.

My Ubuntu VM has two network adapters, one bridged to eth0 on my host, and the second a host-only interface. The idea here is that I still have network access to the VM when my wired connection on the host is down. Imagine my suprise, however, when DHCP was failing on the host-only interface while the bridged network was down. In theory, the host-only networking should work fine even if the host’s bridged interface is physically disconnected (I’m using wireless instead of my normal wired connection, so there’s nothing connected to my host’s Ethernet port).

After mucking about for a bit, I discovered the secret to host-only harmony. I had to turn off the VM, then in VirtualBox go to Settings -> Network, select the tab for my bridged adapter, click Advanced, and un-check the “Cable Connected” box. When I booted the VM again, the host-only adapter was able to DHCP an address on the host-only network, and I could be productive again :-).

Installing the StarCraft 2 Demo on Linux Mint

| Comments

I’m an infrequent gamer, but occasionally I get bored enough to fire something up, generally an RTS of some variety. Today was a rainy Sunday, so I figured I would give StarCraft II a try. I don’t own the game, and didn’t intend to buy it without trying it out on Linux, so I installed the demo using Wine.

There’s a few walk-throughs on the web that I followed to get this going, but none of them specifically addressed the demo. If you’re trying to install the full version of the game, I suspect that PlayOnLinux would be easier (see the referenced walkthroughs for instructions). But since PlayOnLinux doesn’t support the demo, here’s what I did. These instructions are for Linux Mint, but they should work fine on Ubuntu without modification, or other distros with a few small changes.

  • To get the audio working correctly, I had to install wine1.3, compiled with PulseAudio support (instead of wine1.2 which is in the Mint 9 repositories). I found a PPA for that here. If you want, you can just download and install the .deb instead of adding the whole PPA.

  • Get the latest winetricks script:

wget http://winezeug.googlecode.com/svn/trunk/winetricks
  • Make it executable, and install some extras not included with Wine. I’m not sure if all of these are needed, but these installed without error for me:
chmod +x winetricks
./winetricks droid fontfix fontsmooth-rgb vcrun2005 allfonts d3dx9 win7
  • Some walk-throughs suggest installing gecko for wine, I did that the following way:
wget  http://winezeug.googlecode.com/svn/trunk/install-gecko.sh
chmod +x install-gecko.sh
sudo ./install-gecko.sh
  • Configure Wine to use PulseAudio, if necessary:

Then go to the ‘Audio’ tab and select the PulseAudio Driver in the Sound Drivers tree.

  • Configure Wine to disable mmdevapi. In the Libraries tab, under Existing Overrides, you may have mmdevapi listed. Select it, click Edit, and choose Disabled. If it’s not in the list, some people recommend adding it by finding mmdevapi in the above drop-down and clicking Add, then disabling it as before.

  • Download the demo downloader from here.

  • Run the demo downloader using wine:

chmod +x SC2-WingsOfLibertyDemo-enUS-downloader.exe
wine SC2-WingsOfLibertyDemo-enUS-downloader.exe
  • The download is pretty big. Go play outside :-).

  • When the downloader is complete, it will give you the option to install the demo. Go ahead and do that.

  • The demo installer adds a Desktop icon, and an icon in your Wine menu. At this point, you are hopefully good to go. Performance under Wine is not as good as on Windows, so you may have to tweak your graphics settings.

The demo was enjoyable, if a little tame. I might consider buying the game in the unlikely event that I suddenly find myself with a lot of free time :-). For reference, I used the following two sites to put these steps together:

What will happen to 60cycleCMS?

| Comments

As a result of switching to Typo for davidvg.com, I will no longer be maintaining 60cycleCMS. However, it will still be available on SourceForge at http://sourceforge.net/projects/sixtycyclecms/. If you really want to use, fork it, or whatever, go right ahead; the code is licensed under a BSD license.

Frankly, I wouldn’t recommend using it for new websites. I wrote it when I didn’t know too much about web development, and it’s quite possible that it’s vulnerable to a few hacks (see this post for a discussion of some of them). So, consider yourself warned.

I, for one, welcome our new Typo overlords :-).