HOWTO: Running IE6, IE7 and IE8 On Ubuntu Intrepid (8.10) Using VirtualBox

Intro

Being able to check how stuff behaves in various versions of Internet Explorer is unavoidable. Switching to Ubuntu recently made me painfully aware of that fact (again).

This (somewhat illustrated) HOWTO details what one must do in order to be able to easily test their stuff in various versions of Internet Explorer on Windows XP SP3 (without having to reboot, switch computers or paying someone else to do it) while still happily having only Ubuntu installed on their machine.

We’ll be using Sun’s VirtualBox software and Microsoft’s Internet Explorer Application Compatibility VPC Images so lets get on with it.

Downloading and installing VirtualBox

If you don’t like the closed-source idea, compare the differences and try with the OSE version. Let me know how it goes.
Update: Phil’s results aren’t pretty. If you’re also seeing BSODs, you might want to try some workarounds.

If you’re comfortable with installing closed-source (binary) packages continue by adding Sun’s public key:

wget -q http://download.virtualbox.org/virtualbox/debian/sun_vbox.asc -O- | sudo apt-key add -

And adding the following line to /etc/apt/sources.list:

deb http://download.virtualbox.org/virtualbox/debian intrepid non-free

Install VirtualBox, accepting prompts (to create the vboxusers group and compile the kernel module):

sudo apt-get update && sudo apt-get install virtualbox-2.1

virtualbox-install-done2

Now add your user to the newly created vboxusers group:

vboxusers-properties

GUI way: System > Administration > Users And Groups > Unlock (type in your password) > Manage Groups > vboxusers > Properties. Check the checkbox next to your username. Close all (not by cancelling though).

CLI way:

groups <username>
# you will get a list of groups for that username
useradd <username> -g <first group in list> -G <second group>,<third group>,...,vboxusers

Reboot, or logout and log back in (might work). Reboot is the safe bet.

Downloading and extracting Microsoft’s Virtual Hard Disk images (VHD)

Current VHD images can be found here: http://www.microsoft.com/downloads/details.aspx?FamilyID=21eabb90-958f-4b64-b5f1-73d0a413c8ef&displaylang=en – the URLs will probably change (expire), but these VHDs should work until April 2009. I’m installing WindowsXP SP3 images, although Vista images are also available (check the previous link and explanations there for Vista).

(yes, the last two have lower-cased extensions, who knows why)

Create a folder to store the VHDs and download the one you need:

mkdir -p ~/VMs && cd ~/VMs
wget -bqc http://download.microsoft.com/download/B/7/2/B72085AE-0F04-4C6F-9182-BF1EE90F5273/IE8-XPSP3.EXE

Once they’re downloaded, extract them using unrar:

unrar e IE8-XPSP3.EXE XP_SP3_IE8/

xp-sp3-ie8-extract

You can delete the .exe files after extraction, they’re not needed any more.

Creating the Virtual Machine

Time to start VirtualBox (Applications > System Tools > Sun xVM VirtualBox). Create a new virtual machine by, you guessed it, choosing New. Name it and set the Operating System to Windows XP.

virtualbox-vm-naming

Assign some RAM (keep it under half of your physical RAM).

virtualbox-vm-memory

At the Virtual Hard Disk screen choose Existing to open the Virtual Media Manager. Choose Add and select the VHD file you extracted earlier. Choose Select to close the Virtual Media Manager.

Choose Next, then Finish and you’ll return to the main VirtualBox window which should now list your new Virtual Machine.

virtualbox-vm-wizard-final-step

Configuring the new Virtual Machine

Optional: select it, then choose Settings (available on right-click as well). General should be preselected on the left, increase the Video Memory Size and enable 3D acceleration on the Basic tab. Click OK to close the Settings, and click Start to power up your new virtual machine.

Once it boots, cancel out any dialogs, prompts, windows, etc.

Go to Devices > Install Guest Additions (it’s in the window’s menu bar). Follow the prompts accepting defaults and you’ll have installed VirtualBox additions. When prompted, reboot the machine. If it doesn’t prompt you, go to Machine > Reboot (menu bar again).
Once it reboots, click OK on the mouse pointer dialog thingy (you will not have to manually capture the mouse again, nice!).

Now go to Start > Run and paste the following in there:

D:\VBoxWindowsAdditions-x86.exe /extract /D=C:\Drivers

The above extracts some default drivers into the virtual machine’s c:\Drivers folder which we’ll need to set up the Ethernet adapter.

Now go to Start > Administrative Tools > Computer Management and select the Device Manager there. Navigate to Network Adapters, Ethernet Controller. Right click it and choose “Update Driver…“. Select “Yes, now and every…” and click Next. Select “Install from a list or specific location“, click Next. In the Location box paste in “C:\Drivers\x86\Network\AMD” or navigate to it manually. Click Finish.

You should have a working ethernet connection now. Fire up IE 8 and test it out!

Here’s a screenshot:
Screenshot of a Running IE8 install on Ubuntu using VirtualBox

If all went well, we’re done here!

Parting thoughts

When closing the VM choose “Save the machine state” if you wish to avoid waiting for all those boot screens the next time you start the VM.

Virtualization rules.

How I spent my day today

Woke up today with a great idea: having some spare prehistoric hardware laying around I was gonna build a crappy box and install Ubuntu 8.10 on it. Why?

  • I have the time
  • I wanna see what’s changed since the last time
  • I need a *nix box to try some video streaming stuff locally

Building the box took a bit longer than I anticipated at first (using only one hand to screw/unscrew stuff SUCKS). After about an hour, I had:

  • an Athlon XP 1100 (TB)
  • on an Epox ep-8rda+ mobo (nforce2 chipset, onboard lan and sound)
  • with a GeForce 4200 Ti AGP gpu
  • and a 60 GB seagate hdd
  • and a cd-rom of course
  • (was pondering a floppy drive for the fun and looks of it, but couldn’t find any)

I was ready to boot. The box refused.

Beeping like crazy, flashing codes on the mobo, it was RTFM time. Except I couldn’t, cause all the epox sites are gone, and the only manual I managed to find online was in Russian.

Desperate, I just took the CMOS battery out, praying it would reset everything and magically work. While waiting for the battery, I figured I might as well vacuum all the dust out. So I did. Guess what else I picked up.

After taking the vacuum apart and finding the battery inside the vacuum bag, I plucked the battery back in and took a deep breath. Tired, one-handed, frustrated and covered in dust I pressed the power button. IT BOOTED. Wooohoo!

The WindowsXP installed on the disk is from 2004 apparently. After reminiscing for about an hour (and backing up shit I’ll probably never need anyway), I wiped the C: partition and it was now Ubuntu time.

Booted Ubuntu in live-cd mode, it looked ok (although slowish, but that was expected), so I clicked “install”, which was conveniently placed on the desktop. Step 4/7 is the partitioning stuff — it didn’t work, just kept getting stuck with no output whatsoever in the “combobox” interface.

OK, reboot the machine and tried installing from the cd boot menu (the 4th step worked now). Installed. Updated the repos, updated the whole system (250+ MB download). That was around 2pm.

Installed ssh, enabled remote desktoping to the ubuntu box, and that’s where I should’ve stopped (and should’ve started installing webdev stuff via ssh and just forget everything else).

But no. I just had to see if I could install nvidia drivers and enable desktop effects. I could never get those to work. On any distro I tried. Ever. And I really want to see it live.

Bad idea. It’s now midnight, and I still haven’t managed to get the fucking thing to work. Giving up for today.

Other than that though, Ubuntu is looking really good.

This is my orthosis.

shoulder-arm-orthosis
This is my orthosis.
There are many like it, but this one is MINE.
My orthosis is my best friend. It is my life.
I must master it as I must master my life.
My orthosis without me is useless.
Without my orthosis, I am useless.

Back home.

I feel better already. Gotta hop back to the hospital first thing tomorrow morning, though. (to finish up the paperwork and get the final instructions from the fine surgeon that fixed me up)

The signed copy of James Zabiela’s brand new “Renaissance: The Masters Series” arrived while I was away. What an excellent homecoming present from myself :)

Here’s a crappy phonecam photo of it, sent via MMS to email, and then uploaded (cause I broke my usb bluetooth adapter):

Signed copy of James Zabiela's "Renaissance: The Masters Series"

Radiatorium Klokotur Stertor in D-minor

These past few days (and nights) in the hospital have been… interesting.

Tonight, though, has been extra special. First I was forced to endure the whole Dora 2009 final evening terror, and then I had to listen to the winning song twice. Painkillers paired with 0,6l of dark beer helped (to an extent).

What I’m listening to now is a different beast altogether. It’s an amazing dissonance of running water sounds (coming from a non-purged-of-air radiator) paired with a cacophony of snores — there are 3 beds per room, mine’s in the middle — sometimes the left snorer performs a wonderful crescendo, sometimes the right one, sometimes they just complement each other perfectly. The running water sounds are randomly constant.

I’m dubbing tonight’s performance “Radiatorium Klokotur Stertor in D-minor”.

Left clavicle broken.

Broke my left clavicle while snowboarding yesterday. Surgery appointed for tomorrow. Fingers crossed that all goes well.

According to Wikipedia, surgery is rarely used in clavicle fractures, but there’s always a “but” and a “special case” when my ass is involved with something.

Clavicle (collar bone) is supposed to be a fast-healing bone (or so they say). The usual healing time for adults is 4-6 weeks, after which some physical therapy will probably take place (as my left hand might be weakned by the 4-6 weeks of immobilization).

If all goes well, I think I have an idea for my next tattoo :)

UPDATE (17:48):
Woke up around 14:20. Survived the surgery. Vaguely rembering going to the x-ray machine right after the surgery, which means they have x-rays of the metal plates they just installed. I need to get my hands on those and post them here.

SMTP_Validate_Email — Email verification via SMTP written in PHP

Working on a recent project I noticed that about 20% of user’s accounts have not been fully activated (typos in email addresses and/or bounced activation emails being the main culprits). After trying out several solutions (and realizing none of them worked for me), here’s my solution (pasting and excerpt from the README):

SMTP_Validate_Email – Perform email address verification via SMTP.

The class retrieves MX records for the email domain and then connects
to the domain’s SMTP server to try figuring out if the address is really valid.

Some features (check the source for more):

  • Not really sending a message, gracefully resetting the session when done
  • Command-specific communication timeouts implemented per the relevant RFCs
  • Catch-all account detection
  • Batch mode processing supported
  • MX query support on Windows without requiring any PEAR packages
  • Logging and debugging support

The source is over on Github: http://github.com/zytzagoo/smtp-validate-email

Barcamp 2 recap.

Was at the anti-conference  today. ’twas cool. Nothing spectacular tho, but saw a bunch of folks I haven’t seen in a while, which was cool. As usual, it’s all about the networking effect. If you want knowledge and deep insights, stick to googlin’.

The 6 degrees of separation thing turned out to be so fucking true it was unbelievable! Croatia is just one fuckin’ giant village, no matter what anyone says.

P.S.
Good times with the crew that went out for drinks afterwards — we should do it again soon.

BarCamp Zagreb No.2 — This friday

January 23rd, 2009. Zagreb’s second BarCamp. Be there if you can.

I know I will, you know, with me officially working from home on Fridays. Officially. Last friday was my first. It was fuckin’ awesome.

How to make sure your web-related project FAILs

Image taken from http://www.manast.com/2007/10/17/study-fail/

A quick checklist of what to do when you want your web project to FAIL (if not instantly, then over a prolonged period of time during which no one involved will be happy):

  • under no circumstances are you to acquire a staging/testing server with the same setup as the production machine(s) — what a waste of resources! The bang-for-buck ratio clearly steers in the branded coffee mugs and t-shirts direction;
  • outsource your office IT infrastructure;
  • make sure your dev team is understaffed and make sure you over-budget in the bullshit departments — after all, they’re the cream of the crop, bringing in the money with every little thing they do;
  • tolerate a lot of bullshit, incompetence and poor quality work for sustained periods of time — that way you’ll make sure that anyone actually worth a damn within the team/company — leaves.
  • make sure to add additional hoops & hurdles which get in the way of your developers getting things done; These include, but aren’t limited to:
    • have them work behind very restrictive firewalls and/or proxies;
    • do not enable VPN access into the company network;
    • while you’re at it, make sure to limit their mailbox sizes too, so they cannot access work stuff from home with OWA either;
    • for God’s sake, never give them administrative or power user privileges on their machines;
  • don’t do any usability tests/studies, focus groups, alpha/beta previews and other silly shenanigans (which require experts in their respective fields and time to process properly) — have sales, marketing and other departments chime in with what they know “just works and looks great”;
  • have a strong business plan somewhere along the lines of: “we’ll sell advertising space”. Then proceed to evaluate the project’s success on the number of banners sold, their CTRs, page views, bounce rate and similar minutiae that are completely irrelevant and easily faked/bought anyways;
  • keep looking over your shoulder constantly in fright of competition; if you look hard and often enough, there’s a strong chance you won’t get any; If God hates you and decides to strike down upon You (with Furious Vengeance), absolutely make sure to completely ignore them. Ignore the mistakes they’ve made, do not learn from what they did right, and stick to your (time and time again) proven business plan from above; If that doesn’t work, try adding extra banner positions.
  • ignore real users’ feedback;
  • invest in or bet on a software solution / technology that you know nothing about, that your developers haven’t had a chance to work with / test fully yet (or for which you’re unable to hire additional (proficient) developers); bonus points awarded for the software/technology still being in the concept stages (with nothing but .pps slides to show for and a vague alpha/beta release date) and you committing your team to an impossible go-live deadline;
  • make sure non-technical people are managing technical people;
  • ignore backups;
  • have looong, boring, unproductive meetings;
  • institute weekly and/or monthly reporting on as many levels as possible; it doesn’t really matter that the report contents are bullshit and no real work was done; Make sure to explain that it’s not because you have no confidence, or that you’re afraid to relinquish control (your strong urge to know and micro-manage everything) — it’s because the higher-ups said so, and that’s just how it’s done.