Zero Install

Dr Thomas Leonard [ contact | GPG public key | blog | donations ]

Screenshots

The injector (0launch) is a small Python program. You ask it to run a program by giving it the program's full name (a web address). The injector does not need to be installed or run as root. It does not write to any of the traditional software directories (like /usr/bin or /usr/lib). It stores downloads in a cache directory so that you don't need to download anything twice, and programs can still be used when you are off-line.

Getting software

Find a program you want to run on the web

If it's a Zero Install program, it will give the URL to use. In this example, you would drag this FooBillard link to your installer.

The injector can be run manually (0launch URL), but it is normally invoked by another program. Some examples include:

  • GNOME and KDE users will drag the link to Zero2Desktop, creating a launcher on their Applications menu that uses the injector.
  • ROX users will drag the link to AddApp, creating a launcher application that uses the injector.
  • Xfce users will drag the link to the xfce4-panel program, creating a launcher button that uses the injector.
  • Shell users will run the 0alias command, creating a shell short-cut that runs the injector.

Confirm the keys

The injector downloads information about the program from the given address.

It checks that the information is signed using a GPG key you trust, confirming first if not. Even if you don't know about this key yet, the injector may provide a hint if it's in its database.

Finding libraries

The downloaded file says that FooBillard requires various libraries (libpng, SDL, and SDL-mixer). Each library is identified by a web address (URL) in the same way that the main FooBillard program was. The injector downloads information about them in the same way. Since they may be written by different people and be on different sites, you may be asked to confirm more keys. The injector displays a dialog box showing the program and all required libraries.

Confirming the versions

Next to each component (program or library), the injector displays the version it will download. If you want to use a different version, you can change it here. You can either select versions manually, or change your policy. For example, you can choose whether the injector prefers versions that have been tested for a while, or always defaults to the newest one available. When you're happy, click on Execute.

Downloading

The injector now downloads all the required archives (supported formats include tar.gz, tar.bz2, zip, RPM, deb and autopackage). It unpacks each one into its own directory and checks its contents against the cryptographic digest given in the (signed) interface file. If the archive has been changed since the interface file was signed, the download will be rejected. If the archive hasn't been tampered with, it is stored in a cache directory (see sharing for more information) in its own subdirectory, named after the digest. This ensures that no two downloads can conflict with each other.

Running

Finally, the injector runs the program, setting any required environment variables (specified in the interface files) to let it find its libraries. Enjoy your new software!

Upgrading

Run the program normally

The injector remembers when you last checked each program for updates. If it's been too long (by default, one month) then it quickly checks to see if a newer version is available when the program is started. You can skip or disable the check if you prefer. If a new version is available, you'll be shown the same dialog box confirming the versions as when installing.

Changing version manually

Your launcher should provide a way to get back to the versions box at any time. For example, a ROX user would right-click on the launcher and choose Versions.... A command-line user can use the --gui flag to 0launch. This displays the same versions dialog box as before.

Uninstalling

Open the cache viewer

From the dialog box listing the versions, click on the Cache button to see what versions you have available in your cache. Select any you don't want and remove them. If you try to run a program after removing code it needs, it will just display the normal versions dialog box asking you to confirm the version you want to download, and you'll be able to fetch it again.

You might also like to watch the Flash recordings.

For an explanation of what's happening behind the scenes, follow the manual walk-through.