Enable Extra Mouse Buttons in Linux Guest VM (VMware)

It’s long bugged me that I was not able to use the extra mouse buttons (e.g. back) in my Linux VMs under VMware Workstation. Apparently it’s bugged a lot of others too because today after finally reaching my breaking point I did a quick search and found that manually adding a single line to your VM’s .vmx file will enable this missing functionality. Here’s the line, simply append it to your vmx file when your VM is powered down and restart:

mouse.vusb.enable = "TRUE"

I wish I’d hit my breaking point long ago and fixed this… Now my Kensington Expert Mouse is a first class Linux citizen in VMware.

Source of solution: http://goo.gl/zCYj6

VMware Workstation 7.1 and Ubuntu 10.10

Ever since my work computer’s hard disk crashed and I reinstalled VMware Workstation 7.1.2 on Ubuntu 10.10, I get an annoying dialog every time I start Workstation telling me that certain modules need to be compiled. The last, VMCI Sockets, always fails with a compiler error. Apparently the kernel in 10.10 breaks the compile. Here’s how to fix it:

wget http://www.debuntu.org/sites/www.debuntu.org/files/vmware-7.1-ubuntu10.10-patch-v2.tar_.gz
tar -xzvf vmware-7.1-ubuntu10.10-patch-v2.tar_.gz
cd vmware-7.1-ubuntu10.10-patch 
sudo sh ./apply_patch.sh

Sweet! Thanks to this site for the instructions.

Accessing a Windows Home Server Guest Share in Ubuntu

I wanted to use the Transmission-Daemon bittorrent service on Ubuntu to download files directly to my new Windows Home Server. This was harder than I thought, but only because I didn’t understand all the nuances.

First, the WHS share. Simply called “Downloads”, I made it a non-duplicated share that allows the Guest account full access. There is no password on this account. That’s all that’s required on WHS.

Now to Ubuntu. I tried editing /etc/fstab to automatically mount //whs01/Downloads to /mnt/downloads. This worked using my userid and password hardcoded in the fstab file, but then only  root could write to the share. I tried using guest instead, but the same thing happened.

Turns out you can specify “dir_mode=0777,file_mode=0777” which sets up the mount to be updatable by everyone, including the transmission-daemon process. Too easy, once you know what the problem is, that is!

The final fstab entry looks like this:

//whs01/Downloads /mnt/downloads cifs noatime,rw,user=guest,dir_mode=0777,file_mode=0777 0 0

Ubuntu 10.04 Is Here

Not sure why I am so excited about this. Geek obviously, but still. Normally I am fairly reserved when a new version of something comes out, but this one feels different.

I use 8.04 at work at my primary OS with a dash of VMware Workstation thrown in for Windows/Outlook and other testing. At home my machines are primarily Windows 7 thanks to my MAPS and TechNet subscription. I really love using 8.04 at work but it has some issues. Sound seems to be a big problem; often times it will just stop working for no reason until I reboot, which I don’t like to do very often. This is generally fine because I don’t do much that requires sound, but it makes it pretty frustrating when there’s an important screencast to be viewed.

More of a problem is when it slows to a crawl. It’s pretty frustrating when I am trying to get something done quickly and it becomes unresponsive for 30 seconds or longer. I would think any modern OS should be able to multitask pretty well, so I don’t know what’s going on there. This doesn’t happen a lot but when it does, it makes me wonder if I should switch back to Windows.

I am very much hoping that 10.04 fixes both issues.

In the past, I used to occasionally install Linux just for something to do, but then once it was installed, I’d be all “ok, now what?”, then destroy the installation and put Windows back on it. You could hardly blame me: all my clients were Windows-based, so there was little point in me putting much effort into Linux. Times have changed: now I wish all my clients used Linux.

As a test, I installed it under VMware Workstation. It installed fine, but after initially booting, I was unable to enter a password: the keyboard didn’t work. Not the coolest start! I clicked the little man-in-wheel icon at the bottom and selected the option to display the on-screen keyboard. After rebooting, the keyboard showed up and I logged in. Then I opened a terminal and entered:

sudo dpkg-reconfigure console-setup

After rebooting, I turned off the on-screen keyboard. Now everything is working well. Apparently this is caused by a conflict introduced by the VMware tools during automated setup, and by not doing an automated setup this shouldn’t happen.

How to Quickly Configure an Unbuntu/Rails Development Virtual Machine

I’m starting a new Rails project, and as usual I want a new dedicated virtual machine to keep it isolated from my other development environments. Since it will be based on Ruby on Rails, Ubuntu is my choice for operating systems. Though it’s not terribly onerous, I didn’t feel much like installing from scratch, so I found a great resource here: http://hex.io/1lda

After starting the VM and installing VMware Tools as per the site’s instructions (http://hex.io/1ldb) and excellent script (I recommend upgrading the kernel before this to avoid having to run “sudo vmware-config-tools.pl –d” again, like I had to) I used the Synaptic Package Manager to install Ruby, Rails, MySQL Server & client + tools, Git, the full version of vim, and several other packages.

Since my project will use SQL Server as the back-end database, I needed to install a suitable database adapter. Instructions for one such adapter are at http://hex.io/1ld5. As documented, specific versions of support gems are required.

The number one annoyance for me to running Ubuntu in a VM is that horrific speaker beep when doing filename completion or trying to scroll past the end of file in vim.

After some research, I found two complementary solutions. First, edit /etc/modprobe.d/blacklist.conf and add the following lines:

# turn off the PC speaker
blacklist pcspkr

This kills the beep once and for all. However it would be nice to get a visual beep, so add the following to ~/.inputrc:

set bell-style visible

There were also keyboard issues as the VM image is set to an international keyboard by default. I changed the keyboard to a Generic 104-key model and set the layout to English Canadian. No more irritating accent characters.

Here’s a nice article on configuring remote access in Ubuntu: http://hex.io/1ld8. This way the VM can be running on a host in the server room and I can connect to it using my main workstation. I particularly like the bit about allowing multiple users to access different virtual screens.

At the end of the day, I have a pretty current VM image that’s ready for Rails development action.

Being Windows Live

Just watched Being John Malkovich the other day, one of my personal faves. Definitely one of the stranger flicks out there. Another big fave is Shadow of the Vampire, also starring JM.

But we digress. I have seen much about Windows Live but read an article today about how its Windows Live Writer is a great blog editor, so I decided to give it a go. So far it seems good. I think I’ll try Windows Live Mail and see how well it works with my Google Apps account.

Yes, there are definitely a lot of italics in this post!

My Microsoft Action Pack Subscription was activated late last week. I created a VMware VM containing Windows Server 2008 R2 64-bit and Office SharePoint Server 2007 for a project I am working on. I’ve been out of the Windows world for a while now, and while using FOSS tools like Ubuntu, Apache, Ruby on Rails, etc is a lot of fun and often a technical challenge, I forgot how nice it is to double-click an installer and be walked through a series of options. For the most part, it just works, easy peasy.

VMware Cloning and Debian/Ubuntu udev Rules

When cloning Ubuntu 8.04 VMs under VMware, the /etc/udev/rules.d/70-persistent-net.rules file would get an entry for eth1 pointing at the newly-assigned NIC MAC address, leaving the original eth0 entry in place. This would cause networking to not work (i.e. “we’re having notwork problems haha”) and we’d have to manually edit this file, remove the old eth0 entry, and rename eth1 to eth0. PITA!

When we switched to Xen during our brief trial, this wasn’t necessary. We figured the Xen templating process had some smarts. Now that I’m playing with ESXi again, this issue reared its ugly head again. It turns out the file 75-persistent-net-generator.rules has an entry to exclude Xen NICs from getting an entry in the 70-persistent-net.rules file. Sweet! Adding the following line after ENV{MATCHADDR} is assigned causes the same effect:

ENV{MATCHADDR}=="00:0c:29:*|00:50:56:*", ENV{MATCHADDR}=""

It would be nice to use the same exclusion rule as the Xen entry, but substituting “vmware” for “xen” didn’t do the trick, and there’s little point wasting time trying to find out what the right string would be.