Ashton Mills17 September 2007, 12:44 AM
You've gotta love the plug'n'play nature of USB devices, especially when it comes to cameras and other pluggable peripherals. But can Ubuntu make it as easy as Windows?
There was a time where USB didn't mean a lot to Linux. Oh, it actually had support for USB long before Windows did, and keyboard and mice were there from the start. It was the other devices that took time -- printers, certain types of USB drives, web cams and cameras. The fault lies not in Linux's USB support, which is mature and extensive, but in the support of the particular chipsets all these different devices use.
This is why, under Windows, you frequently get a driver CD with them -- because while Windows too has USB support, it doesn't know about every chipset in existence. The problem is that no one releases driver CDs for Linux -- they can't. By definition, almost all drivers come bundled with the kernel, and for a driver to be written, developers must have access to the specifications of a device. Which isn't always easy, and is rarely given, leading to the time consuming job of reverse engineering.
This doesn't always happen of course, especially with big players like video card manufacturers. Here, at least, many provide binary (ie., separate from the kernel and with no source code) drivers to be used.
But only the big guys do that.
In this project we're making the assumption that Windows does all that we need, and we're seeing if Linux and open source software measures up. Perhaps that's not an entirely fair place to sit, however as the de-facto in operating systems for which everyone is familiar, it's our best basis for comparison. So here's how we'll rate the experience of going Windows-free: Optimal
-- Passes with flying colours. The task could not only be completed, but better or easier than under Windows.
Pass -- No problems. The task can be completed exactly as under Windows.
Iffy -- When a task could only be partially completed, or completed but not without issue.
Flop -- Not possible to complete at all. Probably not a good thing.
Case in point, my trendy little MSI webcam. This toy adopted me the last time I visited Computex and, as a USB device not necessarily recognised by Windows, comes bundled with a driver CD for the same. It's a pretty obscure camera, so I wasn't expecting it to work under Linux -- but it all depends on the chipset. Many devices from competing manufacturers frequently use the same chipset, and so it's the support for a chipset that's often included in the Linux kernel so such devices work regardless of manufacturer.
However, plugging in my MSI StarCam webcam Ubuntu sat there and, well, did nothing. Opening up Ekiga (VoIP application) to see if it could be used as a video input, it couldn't be recognised. Exploring in a console and looking at the kernel messages it turns out that, as a video device, the kernel does actually recognise it automatically and is loading the V4L2 (Video for Linux 2) driver as a 'PC Camera Controller', only it couldn't recognise the image sensor being used, so that's as far as it got.
A quick search on the Web didn't turn up support for this particular camera, and so there wasn't anything else to do. And while Windows also didn't recognise it (only fair to check) the driver CD it came with got it up and running.
It's not entirely fair to mark webcams under Linux as a whole just based on this, as I know of other webcams that do work fine in Linux, just not my one. Ah well.
MSI StarCam: Iffy -- When a task could only be partially completed, or completed but not without issue.
To be honest I wasn't expecting much here either. The last time I played around with cameras under Linux I met with a similar experience to the above. However, in essence, a camera to the PC is just another USB storage device so copying the images across should be a plug and play affair.
And it was, almost. To my surprise Ubuntu didn't just detect the camera (an HP R607 Photosmart) as a device to transfer files, it also recognised it as a camera, and much like under Windows up popped a dialog asking if I wanted to transfer all the images across automatically.
|HP R607 Photosmart detection.
Selecting yes however presented the following dialog box:
|I found the camera! But I canna use it cap'n.
Ubuntu was reporting an error with the 'I/O library' unable to 'claim the USB device'. It sounded suspiciously like a permissions problem, so jumping to a terminal I checked to see which program was trying to import the photos -- gthumb -- and ran it with root (administrator under Windows) privileges using 'sudo'. Voila, it now displayed the contents of the camera to copy across.
|Now that's more like it...
Again, Ubuntu falls over with something as simple as the right permissions for device access. The fact it needed root privileges to run should have been addressed prior to release, and would reveal itself instantly if the feature were tested at all. For Ubuntu users coming from Windows and no experience of a console, they simply wouldn't be able to use cameras under the OS. It's one thing to fix media playback due to international license restrictions, it's another entirely when the bug is a glaring oversight like this.
Cameras: Flop -- Not possible to complete at all. Probably not a good thing.
That said, with gthumb running, it impressed the pants off me. In addition to importing images, gthumb is also an image management tool and allows you to view slide shows of the images, organise them via categories, add meta data, and do basic image manipulation like orientation, cropping, resizing, format conversion (jpg to png for eg). Additionally, it includes tools for adjusting brightness, colour balance, saturation, batch file renaming and even nifty option to 'enhance' the image, which appears to adjust white balance and colour levels for a better effect. It's actually not bad, but doesn't work so well with all images. Finally, gthumb can auto-generate a web album for you, creating thumbnails and an HTML gallery template (chosen from a selection) that you can upload to your hosting service for an instant browser browseable gallery. Failing that, you can always burn images to CD and gthumb will also automate that for you. As someone who doesn't normally play around with cameras and photo applications under Linux, I'm genuinely surprised by how far Gnome has come and how easy gthumb is to use.
An alternative to gthumb is F-Spot, also bundled with Ubuntu, which features similar options for managing and tweaking images, including the ability to remove red-eye from photos and with more exporting options including to sites like Flickr and Picassa. The Gimp, of course, is another tool you've probably already heard of for image manipulation, and is bundled with Ubuntu, but we'll save covering that for another time.
Image management: Optimal -- Passes with flying colours. The task could not only be completed, but better or easier than under Windows.
This is barely worth making an entry for, but since the topic is USB pluggable gadgets and there's no greater pervasive USB device than the humble USB drive, we might as well suck it and see. And who knows, there may actually be those wondering if a USB drive does work the same under Linux as it does under Windows. And fortunately, they do. For Ubuntu, plugging in a USB drive pops up a Nautilus explorer window, as well as an icon added to the desktop, and you can play with its contents like any other drive on the system. It's not surprising, as USB storage was one of the first features added to the Linux USB layer when it was implemented many years ago. Now lets just hope webcams can catch up.
USB drives: Optimal -- Passes with flying colours. The task could not only be completed, but better or easier than under Windows.
|USB drive icon.
|USB drive folder.
Open Source Challenge