HowTos

Help: “The network bridge on device /dev/vmnet0 is not running”

This error message occurs sometimes in VMWare Fusion on the Mac when using a certain networking setting. This setting, in particular, is the “bridge” function. “Bridge”, as opposed to “NAT”, means the Virtual Machine gets its own IP-address on your local area network. The “NAT” (Network Address Translation) option, however, makes your Mac act like a router behind which the VM resides. This makes the VM inaccessible to the outside LAN, but it still has access to the outer LAN or Internet.

Bridging for VMs is nice because this is a way you can set up a VM to act as a server – serving printers, web resources, media and files. But sometimes, VMWare Fusion behaves awry, throwing up the dreaded exception:

“The network bridge on device /dev/vmnet0 is not running”

This will cause the VM to be disconnected from the network. There’s no real indication what causes this. Neither does it allude to how to fix it. “Just a Blog” provides a solution:

  1. Close the ailing VM
  2. Open the “Terminal” from Applications/Utilities
  3. Type:
    cd /Library/Application\ Support/VMWare\ Fusion/
  4. Type:
    sudo boot.sh –restart
  5. You may get a message warning you of the perils of sudo. Proceed.
  6. Re-open the VM and make sure network bridging is re-enabled through the Fusion’s “Settings” interface.

You should now be able to access the network through the respective VM. It may occur that this error crops up again. It seems to me that it happens arbitrarily. I wonder why Fusion can’t execute this command by itself, either.

I hope this helped :-) .

How To: Install Windows 7 from external USB disk or USB key

How to install Windows 7 from a USB key or external hard drive? There are a few commands you need to master with the built-in command-line tool called ‘diskpart’. A step-by-step guide.

As I documented the process of preparing an external USB drive to install Mac OS X 10.6 Snow Leopard, it’s only right for me to do the same for its counterpart Windows 7. It turns out doing this for the latter is much simpler than for the former. It should only take a few minutes to prepare the disk, plus the time your computer needs to copy the contents of the Windows 7 install disc or image.

Installing any operating system from a flash or hard drive has the advantage of being faster, because optical discs can only spin so fast – or rather, so slow as the spindle allows.

Here’s how.

Ingredients

What you’ll need to get this super-spiffy install medium:

  • A Windows 7 RC or RTM/GA (Home Premium, Professional, Ultimate) install disc or image
  • A working Windows XP/Vista/7 computer to perform the preparations
  • A 4GB or bigger USB key or external hard drive

Preparing the disk

  1. Pop the external disk into a vacant USB-port.
  2. Open a Command Prompt window, either by hitting the Windows key in Vista/7 and typing cmd or selecting Run… from the start menu in Windows XP and typing cmd.
  3. Then, in the black box, type diskpart – if you’re using Vista or up you’ll be prompted with a UAC window to which you must consent. XP users will be brought to diskpart right away, unless you’re using a Limited Account (if so, switch to an Administrator privileged account or do a Run As…)
    Diskpart intro screen
  4. We need to find out which index the USB device is at, so we’re sure we’re preparing the correct disk (and not, say, your C: drive). Enter list disk. In my case, my USB key is located at position 1. Check which number yours it at before you copy-paste the following commands!
    DiskPart: List Disk operation
  5. To tell DiskPart we want to start preparing disk 1, enter select disk 1.
  6. Type clean.
  7. Now we’re going to repartition the drive into one primary partition, so type create partition primary.
  8. To make the partition we just created the active one, simply enter active into the box.
  9. Then, we’ll want to format the active partition as FAT32. This is done by typing and entering format fs=fat32 quick. The quick keyword will wipe the file table instead of wiping the disk sector by sector, which takes a lot longer. If you’re concerned with the wiped data being completely gone, omit ‘quick’.
  10. Finally, type assign so the drive gets a letter in Windows Explorer for easy access.

Copying the files over

You now have a clean, ready to be copied to, disk. What follows is extremely simple:

  1. Insert your Windows 7 installer disc into the tray or mount the installer image with a tool like DaemonTools.
  2. Open the disc’s/image’s contents by browsing to it using Explorer.
  3. Select all files and folders (CTRL+A or ‘Organize > Select All’).
  4. Copy the files using the right-click menu or hitting CTRL+C.
  5. Paste everything onto the root of the prepared USB drive.

Your USB drive is now bootable

Restart your computer and make sure you boot from USB. The installation procedure will continue as it would from a disc, only faster. Happy installing.

How To: Tweak Firefox' look to fit into Vista/Windows 7

Image courtesy of Grant MacDonald at Flickr.com

One of the many features of Firefox 3 was native UI-integration on Windows XP, Vista, Mac and Linux. While Firefox’ Mac-version does look rather native, Mozilla completely dropped their efforts to take advantage of Windows Vista’s (or 7’s) Aero Glass effects.

Because Firefox has such a vibrant addon-community, you can achieve the effect below by using 1 custom theme and 2 add-ons:

Firefox Vista Look

The stuff you’ll need to achieve this look:

  1. The Theme: Strata Reloaded which you can find here.

    Just hit the ‘Add to Firefox’-button, accept it and let it churn away. You may want to deny the restart, since we’re not done installing add-ons yet.

  2. Add-on 1: Glasser, download here.

    While the theme above introduce prettier icons and the colored bar, Glasser makes Firefox’ chrome transparent like (Internet) Explorer windows. The latest version of Glasser is only compatible with the latest Firefox 3.1 beta. If you click the older version link, you can select the version that’s compatible with the latest stable version of Firefox.

  3. Add-on 2: Menu Mod, here.

    You can hide the menu bar as Internet Explorer does by default by installing the Menu Mod add-on. Once installed, press F2 on the keyboard to toggle the menu bar’s visibility.

“Et voila, c’est tout” as the French say. It’s a pity Mozilla didn’t make this look the default one, it’s much nicer and certainly more native.

Many thanks to the respective theme/add-on developers.

How To: Always Open Links in New Tabs with Safari 4 [Mac]

Safari 4 Beta for Mac annoyingly doesn’t always open links in tabs, and there’s no real preference control to set this like there is in other browsers like Firefox or Opera. Apparently, this characteristic has been floating around in prior versions of the browser, too. While I like Safari’s speediness and mildly dislike the new tab placement in the beta, what bugs me the most is the issue I indicated with the title of this post.

While it is possible to make Safari [always] open links in new tabs, there is no user-friendly way to do this. To accomplish this behavior you will have to enter a line in Terminal.app:

  • Quit Safari (CMD+Q)
  • Open Terminal (\Applications\Utitlities\Terminal.app)
  • Enter:
    defaults write com.apple.Safari TargetedClicksCreateTabs -bool true
  • Close Terminal and re-open Safari

Tada! That does it indeed. While this is easy enough, Apple should have included it here:

safari4betaprefstabs

Note: A solution to this problem in the Windows-version of Safari 4 has not yet been found.

How to: Set up your PC to Develop Ruby on Rails

Web development of is an area of general heterogeneousness when it comes to the tools used to develop for it. ‘Regular’ standalone software development is often characterized by its standardized development regime, with its compilers and IDEs (Integrated Development Environments) defining the stage.

Enter the world of web development and matters are startlingly different. For most scripting languages, be it client-side or server-side, there are no de facto IDEs, nor are there compilers to deal with (which is generally a pleasant side-effect). While this gives you a lot of freedom, it may also be hair-raising and confusing, especially to beginners.

Since my interest for Ruby on Rails has recently been refueled I set out to deepen my knowledge on the matter. Soon enough, I was faced with setting up my computer to accommodate Ruby on Rails development. Unlike OS X, Microsoft Windows doesn’t come with Ruby or Rails baked right in, so we’ll need look at the options for installing it locally. As it turns out, things can turn out to become slightly complicated if you’re on Windows.

On a Mac?

PDF: How to set up your PC to develop Ruby on Rails

More >