O'Reilly Hacks
oreilly.comO'Reilly NetworkSafari BookshelfConferences Sign In/My Account | View Cart   
Book List Learning Lab PDFs O'Reilly Gear Newsletters Press Room Jobs  

Buy the book!
Firefox Hacks
By Nigel McFarlane
March 2005
More Info

Take Firefox with You
Install a portable version of Firefox so that you can move from computer to computer
[Discuss (0) | Link to this hack]

This hack explains how to take Firefox with you wherever you go. You can install Firefox on a number of mobile devices. Whether it can run directly on the device, write data there, or merely be stored conveniently depends on the device. We'll consider these devices:

  • A laptop

  • A server-based virtual private network (VPN)

  • A roaming VPN

  • A mobile consumer device, such as a digital camera, mobile phone, or PDA

  • A USB drive

  • A RAM drive

It's the so-called removable media (USB and RAM drives) that are the interesting cases. Let's briefly dispose of the other possibilities first.

USB Drive

Here's where things start to get interesting. If you can carry Firefox on a USB drive, you can plug it in and run it wherever you go.

There are several options for USB-based Firefox installs. The simplest is to put the standard Firefox installer on the key drive and install it everywhere you go, like Johnny Appleseed planting apples. That puts both the install area and the profile area on the local hard disk, and none of your profile files move with you.

Use a USB launcher

If you don't want to be tied to a custom distribution, you can use the Firefox Launcher tools, available at http://people.emich.edu/mkinnunen/tblaunch/ (Windows only).

The Firefox Launcher is a small Windows program that starts up Firefox once you've installed the profile and install areas on the USB key. Install it on the USB key as well. A trivial launcher can also be made using a simple .bat file. It need only contain the following lines:

cd U:\
start \install\Firefox\Firefox.exe -profile \profiles\ProfileName

Here, the install and profile areas are preloaded to the equivalent directories on the USB drive.

RAM Drive

If you can make Firefox run from a RAM drive, you're one step closer to running it from any drive, anywhere. This URL describes how to put Portable Firefox on a RAM drive on Windows:


RAM drives are somewhat overkill on Linux/Unix. To put Firefox in RAM on Unix, simply execute these commands, which load all Firefox files into the disk buffer cache, where they are subsequently accessed at RAM speed:

 ! -type d | xargs cat > /dev/nullfind 
 ! -type d | xargs cat > /dev/null

This will not, however, remove the need for a disk drive, and neither will it keep Firefox in memory if the system has heavy disk access.

At the time of writing, there is not yet a Knoppix-like CD distribution of Firefox alone, although Knoppix distributions exist that include Firefox. For a real, memory-locked Firefox on Linux or Solaris, create a tmpfs filesystem and install, copy, or load standard Firefox there each time you need to use it. Knoppix distributions automate that process but allow bookmarks to be stored only until the PC is rebooted.

O'Reilly Home | Privacy Policy

© 2007 O'Reilly Media, Inc.
Website: | Customer Service: | Book issues:

All trademarks and registered trademarks appearing on oreilly.com are the property of their respective owners.