August 7, 2006

Interview: PortableApps brings open source to USB

Author: Mayank Sharma

For most people, mobile computing means a laptop. Some make do with a Linux live CD distribution such as Knoppix and a USB pen drive to save their data, or one of the newer live CD distros that run off a rewritable CD or USB drive, but if you can't restart the box where you end up, those won't help you. Now, thanks to John T. Haller's PortableApps project, you get to use your favorite open source productivity applications from a USB drive without restarting a Windows-based host computer.

On the project's Web site you'll find several portable applications: Portable VLC player (audio and video player), Portable NVU (HTML editor), Portable Firefox (Web browser), Portable Gaim (instant messaging), Portable Thunderbird (email client), Portable AbiWord (word processor), Portable (office suite), Portable GIMP (image editor), and several others, each with a dedicated support page and forum.

We asked Haller how he got started, and what we can look forward to from the site.

NewsForge: What prompted you to make applications portable?

John T. Haller: It was a bit accidental at first. Back in March 2004 on the mozillaZine forums, the idea to do a USB version of Firefox was being thrown around. 0.7+ introduced the -profile switch that made it possible. We toyed around with some ideas for a batch file, and I decided I'd run with it and made a package of Portable Firefox, with a batch file and zipped up, available from It grew from there. Suggestions led to compression, switching to NSIS for a better launcher, and more.

As time went on, I expanded to include Thunderbird, NVU, and Sunbird, as they work similarly to Firefox, at least in terms of making them portable. Later, was added to the mix. After over a year of hosting it, I finally started taking donations in November 2005, and I launched in December 2005.

My goals now are to provide a complete set of open source tools so that people can do just about everything they need portably. And to provide a community and toolset so that developers and users can interact to make the apps even better.

NF: What does it take to package a portable app?

JH: A combination of things. I try to avoid making changes to the base app's code when I can, so that I don't introduce any unexpected bugs or other behavior. Most apps are compressed to make them take up less space on the portable device and launch more quickly (less to read off the external drive = faster launch times). To accomplish that, I compress the DLLs and EXEs using UPX. Any JAR or ZIP files are recompressed using 7-Zip. This allows me to cut, for instance, from an install size of 226MB down to 159MB.

To that, I add a launcher/wrapper program that helps the app run from a portable device. This program takes care of things like rewriting config files as the program's path changes (and it does on each new PC running Windows as the drive letter changes), launching with the correct command-line parameters, backing up and restoring registry settings when needed, etc. It also adds in a splash screen for apps that don't normally have one. It may sound minor, but even a small app can take 30 to 60 seconds running off a slower drive, and a splash screen that comes up right away lets the user know that it's starting.

NF: How important is an application's architecture while porting it? Do application developers need to take certain steps to make their applications easily portable? Are open source applications better suited for portability?

JH: The architecture of an application definitely comes into play when making it portable. For Windows, what matters is whether it uses the registry and local folders within APPDATA (the Application Data directory) by default. Also, whether it depends on shared DLLs. Some of this can be addressed in the apps themselves.

Many applications use the APPDATA environment variable to store their data. This is usually under C:\Documents and Settings\[LOGIN]\Application Data\. To make certain applications portable, the launcher will change this or other variables so that they write their information to the portable drive.

Many open source apps tend to be cross-platform. And cross-platform apps are easier to make portable, as they tend not to use things like the registry (since there is no registry under Linux or OS X). That definitely makes them better candidates for becoming portable apps.

NF: Why support only the Windows platform? Any plans of supporting a free/open source platform?

JH: Windows made the most sense initially. When you're out and about, you're most likely going to encounter PCs with Windows on them. Like it or not, much of the world runs on Windows at the moment. But you'll notice that all of the portable apps that have been published by are based on apps that are cross-platform -- Windows, Mac, and *nix. The ultimate goal is to support all of these platforms.

That said, all the portable apps that have been released have been tested and confirmed to work within Wine, so you can use Portable Gaim or Portable Firefox on your Linux box at home, your Windows box at work or school, and that homemade Ubuntu box when visiting Mom.

NF: What's Mac-on-stick? Are you also making operating systems portable? What about Linux distros?

JH: Mac-on-stick was a simple hack someone put together for running older Mac OS versions from a USB flash drive that I had posted about in the app directory. There are several solid portable OS packages out there, such as DSL and Puppy. When the Portable Apps Directory gets an overhaul, I'll be listing them.

NF: Are speeds offered by USB 2.0 good enough? What about 1.1 users?

JH: The apps will work over 1.1, but they will be quite slow. 2.0 is much better. But the main issue is different hardware. Every flash drive says that it's USB 2.0 High Speed these days, but there's a 40 to 50 times speed difference between the slowest ones and the fastest ones in terms of running portable apps (which depend on fast write speeds of small bits of data). To the average consumer, these drives look identical in the marketplace.

AnandTech has done a a few good breakdowns of USB flash drives. I'm going to be listing full specs for drives on in the near future as well. It's tough for a consumer because even the released specs may not be enough to go by. A drive may be able to read or write a 5MB MP3 file with ease, but be slow when writing cookies from within Portable Firefox due to a slower controller chip. This won't show up on any drive's spec sheet.

NF: Are only standalone apps portable? What about LAMP applications?

JH: Standalone apps let people pick and choose what they want to use. They can also get a bundle like the Portable Apps Suite, which will soon be updated with several new integrated features.

LAMP applications will work well within a framework like XAMPP by Apache Friends, which works quite well from a portable device. You'll find it listed in the Portable Apps Directory as well.

NF: When a new version of an app that has been made portable comes out, how easy is it to upgrade?

JH: At the moment, it's a bit manual. You need to copy your data from the old version to the new one. But this is being refined for future releases. The new releases in the last month have a refined directory structure that will make upgrading much easier and, eventually, automated.

NF: Upcoming apps to look out for?

JH: The next releases of Portable Firefox and Thunderbird will support running from a CD or other read-only medium out of the box (a.k.a. "live" versions). Portable 2.0.3 is scheduled out on 26 July and will have an option to set it up to run from CD as well. Over the next week, all 12 apps will be re-released to support the new directory structure, easier upgrades, and improved splash screens, and many will be getting CD run support as well. In addition, Portable 7-Zip and Scite will be making their first general-release appearances. This will be followed by the 1.0 release of the Portable Apps Suite (now in internal beta testing) which features an auto-run menu, sync, backup, and automatic integration with all the apps. Then, over the next four weeks, several more portable apps will be making their appearance on Of course, all of them will be open source with OSI-approved licenses

NF: What about security? Will physical access to the USB drive give access to all personal documents and passwords?

JH: At the moment, yes. You can use a free encryption program like TrueCrypt to encrypt your whole drive. Unfortunately, this requires admin privileges in Windows to run. Many drives come with more full-featured (albeit closed source) encryption apps that people use as well.

NF: How do you think AJAX will affect portable apps?

JH: Eventually, Web-based apps may replace portable apps, but it may take a while until we reach that point. The first AJAX apps are only partially Web-based. For example, the first word processors actually just make use of the WYSIWYG editing capabilities built in to current browsers; they don't actually implement a full word processor. That's why they don't work with the current version of Opera (which has no WYSIWYG editor built in) but they will work with Opera 9 (which will have WYSIWYG editing built in).

There's also the issue of security. How secure are your documents on a server you don't own? Are they visible to other users? Do the owners of the site have access to them? This will have to be addressed for Web-based apps to fully succeed.

Click Here!