Create Your Own Linux Desktop and Take It with You
Most of us work with multiple Linux machines these days, and we are used to hopping between them. However, there are times when you want to separate your Linux desktop experience from your physical desktop PC. You would like a Linux desktop that lives on a USB key that you can move freely among PCs. To explain this better, let me describe two problems I've recently addressed with a small, portable Linux distro:
I don't always work from the same location. Carrying a portable laptop computer around is one way of having my Linux desktop wherever I need it, but another way is to have a small Linux desktop on my keyring. When I arrive at a new work location, I can plug the USB key in to any available PC, boot Linux quickly and continue working right where I left off. The live Linux on the key runs entirely in memory and uses the key for persistent storage. I don't need a lot of storage (most of my data lives in the cloud), but I do need to be able to use a unique set of application packages so I have the tools I need to do my work.
I have a Netbook that bit the dust a few months ago. The failure was in the hard disk, and this particular generation of Netbook uses a 1.6" hard disk. If you can find a replacement drive that size, the price is such that it's cheaper to purchase a new Netbook. I'd like to be able to run my Linux desktop even on this machine, which is otherwise a brick.
To address these problems, I needed a Linux distro with the following characteristics:
Small enough to fit on a USB key.
Bootable on a variety of machines (all PC architectures).
Ability to run in memory only, given target machines would all have 1GB or more.
Application package compatibility with a major Linux distro.
So, why not just run a desktop distro from a USB stick? That, in fact, was my first solution, and most desktop distros make it really easy to create a live USB installation, including persistence to storage on the USB drive. For example, Ubuntu 10.10 (and every Ubuntu release since 9.04) comes with the usb-creator tool that creates a live USB installation for you given the related .iso file.
To create an Ubuntu 10.10 live USB installation, first download the .iso file for the desktop version from the Ubuntu Web site (www.ubuntu.com/desktop/get-ubuntu/download). After the download, plug in a USB stick (2GB or larger), and select System→Administration→Startup Disk Creator from the Ubuntu menu. Select the downloaded .iso and the target USB device—in the case shown here, it's /dev/sdb1. When you click Make Startup Disk, Ubuntu copies all the needed files to the stick and makes it bootable.
You'll get a confirmation box, and then you've got your portable Ubuntu. If that meets your needs, you're all set. You can boot it on another machine, install applications using sudo apt-get install, and do pretty much anything you would do on your desktop, limited only by the available storage on the USB stick.
But, you may have needs that go beyond what you get with a standard off-the-shelf desktop. Because this is Linux Journal, you almost certainly have custom needs and preferences, and fortunately, there are ways to create your very own portable desktop distribution.
Puppy Linux, in particular, is built with customization in mind. If you've never heard of it, you may want to take a look at Louis Iacona's article “Puppy Linux” in the April 2008 issue (www.linuxjournal.com/article/9932). You also should visit www.puppylinux.com. Barry Kauler created Puppy Linux in 2003, and he has continued to develop it and build a community of developers for it since then. Lately, Barry has focused more on customization capabilities for the platform, resulting in the Woof tool, which builds Puppy-like distributions.
Puppy Linux has many other desirable features, including:
Runs entirely from memory, so it's very fast.
Very small memory footprint (100–110MB).
Support for a wide variety of hardware devices.
Compatibility with packages from other distributions (including Ubuntu).
User interface that's intended to be approachable.
There also are some features that might not be desirable, depending on your application:
Runs entirely in memory, so all active programs have to fit.
User runs as root, so there's the potential to screw up.
Hardware device support not as complete as major distros.
Even with the tools that Puppy Linux provides, building your own distribution isn't for the novice. You need to be comfortable using the Linux command line, have a suitable build environment and a broadband Internet connection. Additionally the tools still are under development, so expect that things are not entirely complete (such as reports and so on), and that some combinations of configuration choices just may not work yet. The best news is there's a very active community of Puppy and Woof users you can reach for help at puppylinux.org.
Building your distribution proceeds in five stages, with each stage having a number of steps:
Create a Puppy Linux host system. The Woof tool works only when run under Puppy Linux, so the first thing you need to do is create a host system that runs PL.
Use your PL host to download the Woof tool.
Use the woof_gui tool to configure the files that Woof will use to build your distribution.
Build your distribution.
Install your distribution on a bootable USB key.
Rick Rogers has been a professional embedded developer for more than 30 years. Now specializing in mobile application software, when Rick isn't writing software for a living, he's writing books and magazine articles like this one.
|Nightfall on Linux||Oct 26, 2016|
|Daily Giveaway - Fun Prizes from Red Hat!||Oct 25, 2016|
|Installing and Running a Headless Virtualization Server||Oct 25, 2016|
|Ubuntu MATE, Not Just a Whim||Oct 21, 2016|
|Non-Linux FOSS: Screenshotting for Fun and Profit!||Oct 20, 2016|
|Nasdaq Selects Drupal 8||Oct 19, 2016|
- Installing and Running a Headless Virtualization Server
- Daily Giveaway - Fun Prizes from Red Hat!
- Daily Giveaway
- Ubuntu MATE, Not Just a Whim
- Nasdaq Selects Drupal 8
- Nightfall on Linux
- Secure Desktops with Qubes: Compartmentalization
- Build Your Own Raspberry Pi Camera
- Canonical Ltd.'s Ubuntu Core
- Non-Linux FOSS: Screenshotting for Fun and Profit!