USB flash drives may be the sneakernet of the 21st Century, but with a little open source software, you can carry a veritable arsenal of tools in your pocket.
The USB port has become a ubiquitous interface in all modern personal computers. Unless your PC harkens back to the Stone Age, if you have a USB cable or a thumb drive, you should be able to interface with virtually any computer and transfer data. USB drives have also become incredibly cheap, and with multi-gigabyte devices costing less than $100 nowadays, every geek should have one in their “murse” (that’s short for what my wife calls my “man purse,” my trademark gadget bag).
But are you really taking advantage of USB? USB ports and thumb drives can do far more than act as advanced sneakernet devices. Here’s a few tips to make you the literal Felix the Cat of your USB domain.
Running Applications from USB Drives
A USB drive is great for storing data, but did you know you can run applications directly from it? If you work in an environment where you’re not allowed to install applications on your PC, or if you’re frequently on the road and don’t always carry your own personal laptop with you, or if you just want to be able to carry your entire productivity environment with you wherever you go, consider the PortableApps Suite, a collection of well-known, open source applications for Windows. It’s likely that you already run the applications in the Suite on your Linux desktop; but PortableApps gives you the convenience of running the same applications on anyone’s PC, without disrupting the machine or leaving a trace of your activity. You just plug in your USB device with the applications installed, click on a launch program, and you have an instant office environment, along with all your files.
To set up your USB drive as a portable application device, head over to the PortableApps Web site at http://www.portableapps.com and download either the Standard or Lite version. The former has a complete install of OpenOffice.org, whereas the latter version uses AbiWord. Both versions contain a launcher/menu program that runs off the USB device, and both include Firefox, the Clamwin virus scanner, GAIM, the Mozilla Sunbird calendaring program, the Mozilla Thunderbird POP3/IMAP email client, and the portable VLC Media Player. The Standard version is 260 MB when fully installed on the USB drive; the Lite version is 105MB. Both suites will also install on your iPod and USB hard disks, not just flash drives.
Speaking of the iPod, have you ever wanted to manage your iPod’s files while at a remote location, but couldn’t install iTunes on a remote PC or Macintosh? There’s a great program called YamiPod (http://www.yamipod.com/) that runs directly off the iPod. YamiPod plays your playlists, plays music files on the computer it’s connected to, searches files, removes duplicated tracks, finds lost music files, and synchronizes to the PC. Best of all, its multi-platform and runs on Linux, Windows and Mac OS X, so you can have all three versions installed simultaneously, sharing the same database. The application is completely “self-hosting” and installs all its support files on the iPod.
Two other sites that catalog portable applications (both shareware and open source) are Kizikias.net (http://www.kikizas.net/en/usbapps.html) and Snapfiles (http://www.snapfiles.com/features/ed_usb_software.html). Both sites tend to have utilitarian, albeit useful stuff you might want to have, particularly if you support other end-users.
System Rescue, Portable Linux Distributions, and Portable Virtual Machines
A USB flash device is convenient, because unlike a CD-ROM disc, it’s much smaller to carry with you at all times â€” it can just hang off your set of house and car keys. Better yet, if you keep a set of boot images and rescue tools on the flash device, you can salvage data from or even restore a machine to working order.
One particularly useful USB-bootable Linux distribution is SystemRescueCD (http://www.sysresccd.org/). It enables you to mount, read, write, and undelete the major Linux filesystems (ext2, ext3, and ReiserFS) and the major Windows ones (FAT32/NTFS). SystemRescueCD includes programs like Gparted (a PartitionMagic clone) and PartImage, a partitioning image and restore utility similar to Symantec’s GHOST. While this distro is normally distributed on CD, it also installs quite easily to a USB drive. The SystemRescueCD site includes comprehensive instructions on how to do it.
The Trinity Rescue Kit (http://www.trinityhome.org) is a similar Linux-based CD rescue kit, which is also USB bootable. However, Trinity differs from SystemRescueCD since it’s targeted primarily towards the rescue and restoration of Windows machines.
While not rescue discs per se, there are a number of other micro-Linux distributions that can boot directly from USB drives. DamnSmallLinux (DSL, http://www.damnsmallinux.org) is a completely usable GUI-based Linux distro that takes up a whopping 50 MB of space â€” small enough to fit on even the cheapest $15 thumb drive. DSL includes a fully functional X Window System, Firefox, and a number of other useful filesystem and network utilities. DSL offers pre-formatted and pre-installed thumb drives for $65 with shipping and handling, or you can install it on your own thumb drive using the syslinux utility for Windows or using a similar installation method as referenced on the SystemRescueCD site.
Another flyweight Linux distribution that’s gaining popularity is PuppyLinux (http://www.puppylinux.org). Puppy is somewhat more modular than DSL, as it has both a smaller configuration (28 MB) and a more robust one with more applications (70 MB), and it’s better suited to Linux novices than DSL.
In fact, many, if not all CD-based Linux distributions can run directly off flash and other USB devices (such as the iPod) by booting the source ISO image in VMWare Player (http://www.vmware.com), a free virtualization program for both Linux and Windows. The catch is that you must first create a virtual machine on the USB device by copying the ISO files to it and running the New Virtual Machine wizard in either VMWare Workstation (free for evaluation) or VMWare Server 1.0 (free) for Linux or Windows. For instructions, see “VMWare Player” (http://www.linux-mag.com/id/2388/) on the Linux Magazine Web site.
Some micro-distros, such as DSL, have also been validated to work on QEMU (http://fabrice.bellard.free.fr/qemu/), an open-source CPU emulator for both Linux and Windows. For a full list of supported versions, check out the Web site. However, because QEMU is an emulator, performance isn’t as optimal as when using VMWare.
Interfacing with Cell Phones
Everyone’s got a cell phone these days, but did you know that you can back up your phone book, your cell camera pics, your downloaded Java applications, games, ringtones, and MP3 files to your PC? Most of the cell phone manufacturers and mobile service providers have software and USB cables to allow a Windows PC to do simple data transfer and backups back and forth to the phone, such as with Motorola’s own Mobile Action software and cable kit.
Yet there’s far more you can do with your phone than just do data transfers. With open source software, you can also unlock many features of your phone that your service provider turned off by default, and you can create custom wallpapers, ringtones, and even manipulate the phone’s wireless data capabilities.
moto4lin (http://moto4lin.sourceforge.net) connects to a large number of Motorola phones (and many new ones are being added) that have micro-USB ports, such as the popular RAZR V3 that runs on GSM and CDMA networks. moto4lin is a native Linux application and is built with the Qt libraries, the very same libraries that power the KDE desktop. To see if your exact model is supported, peruse the moto4lin hardware support list at http://moto4lin.sourceforge.net/wiki/Category: Models.
The easiest way to get moto4lin is to run Ubuntu Linux, as the software is part of the
universe repository. (For more information on Ubuntu package repositories, read “Tweaking Ubuntu” on the Linux Magazine Web site at http://www.linux-mag.com/id/2782/.)
Edit your /etc/apt/sources.list file (with
sudo gedit /etc/apt/sources.list) and make sure you’ve got these two lines:
deb http://us.archive.ubuntu.com/ubuntu/ dapper universe
deb-src http://us.archive.ubuntu.com/ubuntu/ dapper universe
Next, from the terminal prompt, issue
sudo apt-get update and
sudo apt-get install moto4lin to install the software.
moto4lin runs on other Linux distributions, but it’s likely that you will need to compile it from source and install it manually. See http://moto4lin.sourceforge.net/wiki/CVS_Installation for instructions.
Once the software is installed, run
sudo moto4lin to launch the moto4lin GUI. Once you’ve connected the USB cable to your Motorola phone, the software attempts an automatic connection. Initially, you’ll get an error, because on Ubuntu, the phone initializes using an OCHI ACM USB connection on /dev/ttyACM0, and the software is set for something else by default. Go to the Preferences menu and set ACM Device to /dev/ttyACM0, hit the “Update List” button, select the Motorola phone from the list, click on Set as P2k Device (P2K is the name of the protocol the phone uses to communicate with a PC) and then click OK. (See Figure One.)
You should then be able to click on the Connect/Disconnect button and connect to the phone. Once connected, you can browse the phone file system, use the Seem Editor (the function used to set various software toggles on the phone to enable or disable various functions), or upload/download files and Java applications. moto4lin is pictured in Figure Two.
Another method to interface with cell phones is via an application called BitPim (http://bitpim.sourceforge.net). BitPim it can be installed using
apt-get install bitpim on Ubuntu (provided you’ve enabled the repositories as above), and it also runs on Windows and Mac OS X. In addition to a number of Motorola models, it also supports phones from LG, Sanyo, and Samsung, but only on CDMA networks (that is, Sprint PCS and Verizon).
Please be aware that any modification of your phone using these utilities voids your warranty. Be sure to back up your firmware and restore it using the officially supplied phone software from the manufacturer or via third-party backup tools for Windows.