All posts by Peter Ridge

Peter is a product development and management professional whose career has spanned from computer hardware and software engineering to product packaging, print advertising and user experience design. He is a published author and has applied his skills to a variety of businesses from start up ventures to top-10 media companies.

VirtualBox USB Proxy Service on Ubuntu Gutsy Gibbon

When accessing the settings dialog in VirtualBox on Ubuntu/Kubuntu 7.10 Gusty Gibbon, I would get the error, “Could not load the Host USB Proxy Service (VERR_FILE_NOT_FOUND). The service might be not installed on the host computer.” I found a variety of fixes from different forums and blogs so here’s a consolidated guide to resolve the issue based on my installation of VirtualBox 1.5.6 on Kubuntu 7.10.

  1. Open the file /etc/init.d/mountdevsubfs.sh with your favorite text editor (be sure to use sudo or open as root so that you have write permission).
  2. Look for the following comment:# Magic to make /proc/bus/usb work
  3. Remove the hash mark, #, from the four commands (mkdir, domount, ln, mount) following that comment. The result should look like the following:#
    # Magic to make /proc/bus/usb work
    #
    mkdir -p /dev/bus/usb/.usbfs
    domount usbfs “” /dev/bus/usb/.usbfs -obusmode=0700,devmode=0600,listmode=0644
    ln -s .usbfs/devices /dev/bus/usb/devices
    mount –rbind /dev/bus/usb /proc/bus/usb
  4. Save the file and run it with sudo (or as root) appending the parameter “start” to the end:sudo /etc/init.d/mountdevsubfs.sh start
  5. Next, create a new user group called usbusers. On Kubuntu, you can do this with the User Management tool in the KDE Control Center.
  6. Add your username, and anyone else who uses VirtualBox on the computer, to the usbusers group. Save the changes.
  7. Open the file /etc/udev/rules.d/40-permissions.rules (again, using sudo or as root). 
  8. Change the following lines:# USB devices (usbfs replacement)
    SUBSYSTEM==”usb_device”, MODE=”0664″

    to

    # USB devices (usbfs replacement)
    SUBSYSTEM==”usb_device”, GROUP=”usbusers”, MODE=”0664″

  9. Save the file.

Now it should work fine and you don’t even have to reboot.

Fix Firefox Crash: Part 2

Previously in the post, Fix Firefox Crash with Yahoo Mail, I covered a very simple way to eliminate a very frequently occurring crash problem due to a conflict between ad blocking addons and a module installed by Yahoo! Instant Messenger.

That fix significantly reduced the crashes that I encountered. However, I was still getting occasional crashes under the same circumstances with Yahoo! Mail. But, I’ve tracked that down and, so far, seem to have alleviated all the crashes.

I’ve been using two different ad blocking addons for Firefox, AdBlock and AdBlock Plus, though not on the same operating system. On the computer that was still having a crashing problem, which was running Windows XP, I had AdBlock installed. Switching to AdBlock Plus made the difference.

So, should you just switch to AdBlock Plus and not use the previous fix? Not so fast. The previous fix works even if you don’t use any ad blocking add-on. So, start with it first.

Have other helpful fixes for Firefox or improvements to this fix? Post it in the comments.

Firefox Can’t Download Anymore

Yesterday, someone at work was having a problem where his Firefox would no longer download files. The Downloads dialog was empty but Firefox refused to downloading anything even when selecting to save manually.

This is usually caused by a corrupt completed-downloads file. Here’s how to fix this download problem:

  1. Close Firefox
  • Open your favorite file manager and go to your profile folder:Windows XP: C:Documents and Settingsyour_Windows_login_nameApplication DataMozillaFirefoxProfilesa_bunch_of_letters_and_numbers.profile_name

    Linux: ~/.mozilla/firefox/a_bunch_of_letters_and_numbers.profile_name

     

  • Delete the file named downloads.rdf
  • Start Firefox

That’s all, folks!

Fix Firefox Crash With Yahoo Mail

For a while, my Firefox 2 on Windows XP would crash almost every time I logged out of Yahoo! Mail. Sometimes it would even happen if I just switched from Yahoo! Mail to another tab or closed the tab. The problem appears to be caused by a plugin installed by Yahoo! Instant Messenger (YIM) conflicting with ad blocking, and possibly other, browser addons.

Here’s how to fix it:

  1. Go to C:Program FilesYahoo!Shared
  2. Rename the file npYState.dll to npYState.dll.disabled, or move it to another folder. I created a folder called Disabled and put it in there.
  3. Restart Firefox

All fixed!

See also: Fix Firefox Crash Part 2

Resume from Hibernate Failed on Ubuntu Gutsy Gibbon

For many years I’ve enjoyed the reliability of the Ubuntu/Kubuntu Linux hibernate functionality (just the opposite of Windows). However, today it actually failed. When I powered up the system, it didn’t resume from the swap file. Instead, it just booted up as if I had previously killed the power.

Upon checking into the problem, I noticed that the UUID for the swap partition had changed. I don’t know why. After much hunting and trial-and-error, I was able to reinitialize the swap partition, update the necessary config files and get the system to resume from hibernate once again.

1. First, you need to know the /dev path to your swap file (e.g. /dev/hda2). If you don’t know what it is, take a look inside the /etc/fstab file. In the recent versions of Ubuntu, there is a comment above each device’s UUID entry to tell you what path it points to. Look for a line with

UUID=a-bunch-of-letters-and-numbers none swap sw 0 0

On the line above it should be a comment that says what partition it is (e.g. # /dev/hda2)

Now, armed with that information, do the following:

2. sudo mkswap /dev/your-swap-partition
For /dev/your-swap-partition, fill in the swap partition path you found in the /etc/fstab file. This will reinitialize your swap partition and create a new UUID. Copy down the new UUID (e.g. copy it to the clipboard).

3. sudo gedit /etc/fstab
Look for the same UUID= line from step #1 (the one for your swap partition). Replace the existing UUID value with the new one that you copied in step #2. Then, save the file.

4. sudo gedit /etc/initramfs-tools/conf.d/resume
Replace the old UUID value that appears after RESUME=UUID= in the file with the new value from step #2. Save.

5. cd /dev/disk/by-uuid
This directory contains symlinks from UUIDs to actual partitions.

6. sudo rm your-old-UUID
Enter the old UUID for the swap partition in place of your-old-UUID. This will remove the old, incorrect symlink.

7. sudo ln -s ../../your-swap-partition your-new-UUID
Now, create a new symlink from your swap partition to the new UUID.

8. sudo swapon -va
This will mount the swap partition based on the UUID settings you entered. If it succeeds, you didn’t make any mistakes. If it fails, then you need to verify that you have the correct UUID and partitions in the steps above.

9. sudo update-initramfs -u
This will create a new initramfs image. When it’s done, you’ll be able to hibernate and resume again.

That was a really weird problem. Thanks to a combination of techniques from these two sources, I was able to get it back to normal:

Suddenly my swap drive was missing
Kubuntu Edgy: swap failed when awaken from hibernate