Get USB devices mounted on your Virtualbox XP machine in Gutsy (Ubuntu 7.10)

vbox.pngThere’s nothing more frustrating than not being able to mount your USB devices in your virtual machines. Well, maybe there are lots of things that are more frustrating but this morning my inability to do something that should be simple, easy and fun was driving me nuts.

So I figured out how to do it and decided to share this software solution on Arsgeek. It’s not terribly pretty but here’s what you need to do.

First, Gutsy got rid of the previous versions of Ubuntu’s way of handling USB mounts by not using USBFS anymore. Doh. That’s an issue for Virtualbox and your virtual XP installs. So you’ll need to download and install the latest Vbox release, 1.5.2. Click on that link to download the .deb file. Save it on your desktop and then double click on it to install it.

For a quick and easy tutorial on using Virtualbox and installing a virtual XP instance, see UbuntuGeek.

Once you have your virtual XP machine running on your Gutsy host, it’s time to do a wee bit of hacking. Turn of your XP instance and let’s roll up our sleeves and get to work.


First, open a terminal session (Applications-> Accessories-> Terminal) and type in the following to edit a script file:
gksudo gedit /etc/init.d/mountdevsubfs.sh
Once you’ve got that open in Gedit, type CTRL-F to search for a string. Search for ‘magic’ (sans quotes).

That should bring you to this:
#
# 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

All those pound signs are comments. Remove them from the last four lines so you end up with this:
#
# 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

Save the file and exit Gedit. Round one goes to the user!

Now we’re going to create a group called usbusers. Go to System-> Administration-> Users and Groups. Type in your password and then click the Manage Groups button. From there click the Add Group button and name it usbusers. Check off your username below. Exit these windows and round two goes to us.

groups.png

Now we’ve got to change a file in udev. So, let’s gedit it and gedit over with. I’ll apologize for the bad jokes in a later post.
gksu gedit /etc/udev/rules.d/40-permissions.rules
Again, CTRL-F to bring up the search dialog and search for ‘usbfs replacement’ (again, sans quotes). Once you find it, you should be looking at this:
USB devices (usbfs replacement)
SUBSYSTEM==”usb_device”, MODE=”0664″

You’ll want to change it to this:
# USB devices (usbfs replacement)
SUBSYSTEM==”usb_device”, GROUP=”usbusers”, MODE=”0664″

Save your file and exit out of Gedit.

Now, the last bit of hackery which may or may not be required for you. It was for me. We’re going to add a mount to /etc/fstab for usb devices using usbfs.
gksudo gedit /etc/fstab
At the bottom, add the following line:
none /proc/bus/usb usbfs devgid=46,devmode=664 0 0
Save the file and exit Gedit. Phew! Now, the easiest way to get all of these changes working on your system is to restart it. So go ahead and do that and then I’ll see you back here in a few.

Back? Great. Time to plug in your USB device, whether it’s a thumb drive, an iPod or something else, plug it in and let Ubuntu detect it.

Now, we’re going to open up Virtualbox and make some changes to your XP machine BEFORE you start it up. So go to Applications-> System Tools-> Virtualbox and get it started up.

Highlight your XP machine (if it’s not the only instance of a virtual machine) and click the Settings button at the top of Virtualbox. You should now have a USB option on the left hand side of your settings. Click the add icon on the right hand side (see the pic below) and select the device from the list. In my example, it’s a 512MB memory key. Now click the Okay button.

vboxaddusb.png

Start up your virtual XP machine and you will see a notice pop up courtesy of Ubuntu about unsafe device removal. Nod your head sagely and let’s continue on. Once XP is up and running, it should automatically detect the new USB device, and do it’s best to install it. With my memory key, it was as simple as turning the virtual XP machine on and letting XP take care of it.

You may have to go to the Devices menu on your virtual machine (once it starts up) select USB Devices and then uncheck whatever it is you’re trying to mount. Repeat the process, this time checking it off and it should mount if it didn’t automatically.

Share

Ubuntu getting Xorg.conf GUI

Remember the good old days when to change a screen resolution or driver, you had to edit xorg.conf or reconfigure X.org? Those fine times are now over, or they will be, with the release of Ubuntu 7.10. As of an update from a few days ago, users are now able to access a graphical user interface for editing xorg.conf and it’s about time!

Share

Unix/Linux Cheat Sheet

Cheat Sheet
Extremely handy terminal command reference sheet, available as a PDF file (image visible and readable on the page). Divided into the following categories: File Commands, Process Management, File Permissions, SSH, Searching, System Info, Compression, Network, Installation, and Shortcuts. Licensed under Creative Commons. Visit our ArsGeek blog for more….

Share

Why you should be excited about Ubuntu 7.10

ubuntulogo.pngI always enjoy it when a new version of an operating system hits the streets. I like moving through all the new features, finding out what was included and what was left out and generally enjoying myself for a few hours just looking around. But then, I’m a geek. I know not a ton of other people share this passion on the public blog.

Even if you’re not as passionate about new operating systems as I am, if you’re at all a Linux fan you should be excited about the latest Ubuntu release. Why? Because it’s going to fix one of the four major issues keeping Linux off desktops.

In short, here’s my major beefs with my favorite operating system.

  1. No way to configure X.org without hacking a text configuration file.
  2. Lack of modern games developed for Linux.
  3. Lack of minty, fresh off the shelf drivers for all the latest video cards.
  4. Inability to purchase bare metal machines without paying the Microsoft Tax. (Starting with Dell however, this may be going away fast).

Notice that three of them are interrelated? Graphics, graphics, graphics. This is the major blockade that’s keeping Linux from moving more swiftly on to the desktop. Thankfully with the new X.org (7.3) which will begin to make appearances in Gutsy (7.10) will go a long way towards fixing this issue.


Not only does X.org 7.3 have much better monitor autodetection, come with a new Intel driver and have RandR support (think output hotplug – or fast switching of monitors or output devices) but it will also jive with BulletProofX and DisplayConfigGTK.

So what the heck are those things? BulletProofX is an attempt to have Ubuntu always boot into a graphical environment, even if the xorg.conf file is bad. Think of it as a failsafe mode. From this 800×600 or 600×400 screen you can use DisplayConfigGTK to configure a new xorg.conf file.

dualmonitors.jpgAnd what’s so special about DisplayConfigGTK? It’s a graphical way to adjust your display! Not only does that rhyme, but it’s bringing Linux in line with every other major operating system out there. You can now adjust your display settings, set up a dual-monitor system or have several display profiles and you can do it all graphically. Finally!

All of this is new stuff, and it may not all make it into Ubuntu 7.10, as many aspects are fairly modular but it’s a damned good start.

Hats off to all the folks who are working on these projects, from the X.org folks to the Ubuntu developers to the Janes and Joes like you and I who test the Alpha and Beta releases and provide bug reports. This is a huge step forward and we should all be proud.

Share

Two Gnome easter eggs

Want to have a little bit of fun with your Gnome desktop? here are a few easter eggs covered by the ArsGeek tech specialist.

First, hit the Alt-F2 keys together to bring up the Run Applications dialog.

Type “gegls from outer space” (sans quotes) and hit the enter key. You should get the below game, a la space invaders.

gegls.png

Next, try typing “free the fish” (sans quotes) into the Run Applications box. You’ll get Wanda on your desktop. Here she is checking out my Zen Stone.

wanda.png

If you have any other Gnome, KDE or Ubuntu easter eggs, feel free to post them here.

Share

Is the world ready for Ubuntu’s six month release cycle?

ubuntubanner.jpg

With Ubuntu hitting the main stream (don’t argue with me, being sold by Dell is about as mainstream as you can get) I’ve been thinking about their constant upgrade/release cycle among other potential obstacles that may stand in the way of more widespread adoption of my favorite operating system.

I’m a die-hard Linux and Ubuntu enthusiast. I love the OS, I love using it and I love encouraging others to do so as well. I’m not a zealot however and I’m hoping that gives me a bit of an open mind when considering some problems and obstacle that Ubuntu still has to face if we’re going to see more mainstream adoption. “Dude you’re getting a Dell” is amazing, it’s awesome, it’s wonderful and it’s not going to get Ubuntu all the way there, where ‘there’ is a significant share of desktop installs. I still use windows on a number of machines and OSX on one or two more and these operating systems have a lot going for them as well. Particularly in the realm of usability and pure and simple name brand recognition.

So what obstacles have to be overcome? The first two are obvious and have been much discussed, so I’ll mention them to get them out of the way. Games and device drivers. (Are you listening ATI? Ahem). Moving on, let’s look at some of the issues that may not be as apparent but I feel are just as important.

The first is visibility. There are lots and lots and lots of computer user out there who know nothing about Linux. And know what? They don’t really care. They buy a computer to have it turn on and do some basic activities. They don’t know much about Windows or any operating system that’s on their machine. They’re expecting not a complicated device, but an appliance. I see this day after day when I ask a user “What operating system are you running” and they say something like “Uh… office 2006” or “Osk”, which is how you’d pronounce OSX if it was said as a three letter word. They grab a random computerish name from their memory and spit it out.

While visibility is certainly an issue, the invisible OS syndrome can actually play in favor of Linux as well. If john and Jane user purchase a Dell with Ubuntu because it’s $50 cheaper, bring it home, turn it on and start surfing the web and checking email then more power too them. This is now a possibility not through a small custom install workshop, but a massive industrial giant, Dell. It could also be a problem. I recently talked a small business owner out of purchasing two Dells with Ubuntu preloaded on them, as he runs a Windows only application as his POS software. Purchasing two Ubuntu installed Dell’s would have saved him $100 and given him two computers he couldn’t really use.

The second is the 6 month release cycle. This is what really drew me to Ubuntu in the first place, before it was the much easier to use instance that we have today with 7.04. A (mostly) hard and fast rule of six months per development cycle and release ensures that serious issues are addressed soonest and that new features continue to come down the pipe in a very timely manner.

Lots of people the world over will hate this. These are the folks who are running Windows XP and haven’t quite made the move to SP2 yet. Why? Not because they’re lazy but because they don’t want to have to change things on their computer, either through fear or ignorance. You don’t have to update your TV every month do you? Why do it to your computer, which in many mind sets is just another appliance. On the one hand, there’s the combination of automatic updates (and alerts) without having to reboot each time. On the other hand, in order to get the latest and greatest, albeit free upgrades, you’ll need to do a complete system upgrade at least twice a year or stick with a Long Term Support versions of Ubuntu.

Granted there’s a shift in computer literacy right now, as more and more kids grow up with technology and computers present in their lives from day 1. This may ameliorate the upgrade effect a bit in the future but we’re going to have to wait until these folks are purchasing computers for themselves en mass. Here’s a population group that’s going to have to get used to a new and better cell phone every week, they should be fine with two upgrades a year.

I’m all for the popularization of Linux in general and Ubuntu in specific but I’m also very curious to see how well the Dell deal plays out and what sort of complaints we’ll get both from new Ubuntu users and those long time users in the forums and groups who may have to deal with a sudden influx of folks completely new to Ubuntu and who may not have expected to dive head first into Linux. Yeah, it will be their “fault” for purchasing an Ubuntu machine, but we as a community would do well not to act with exasperation when the pop up in the forums asking questions that are answered in the FAQ’s or complaining that MS Office isn’t available. Here’s our chance to educate and accept a new face in the crowd. We shouldn’t see them as at fault, rather we should look at the opportunity to educate and increase acceptance. Hell, apply that to lots of areas in our lives and we’d get a lot further.

Share