The Zero Install system

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

Documentation

The documentation is split into four parts, for the different types of reader we have:

User
Runs software using Zero Install.
Admin
Sets up zero install for users.
Packager
Makes software available to others via Zero Install. See the Packagers page for more information.
Zero Install developer
Helps write the core Zero Install system. See the Technical details page for more information.

Everyone is encouraged to subscribe to the mailing list and talk about any issues related to Zero Install.

Documentation for users

Generally, you don't have to do anything special to use the system. When you find software on the web which is available via zero install, you'll be told where it is, and you can run it from there. For example, you can run ROX-Filer like this:

$ cd /uri/0install/rox.sourceforge.net
$ ./rox

To make it easier to find it in future, you should bookmark it somehow. Some possibilities are:

  • Drag the program from a filer window onto the pinboard or panel, or add a filer bookmark.
  • Add it to a Start menu or other launcher program.
  • Symlink it into your path, eg (assuming PATH contains ~/bin):
    $ ln -s /uri/0install/rox.sourceforge.net/rox ~/bin
    $ rox
    
  • Make a shell alias:
    $ alias rox='/uri/0install/rox.sourceforge.net/rox'
    $ rox
    

There should never be any need to worry about libraries and supporting programs, because they are all accessed automatically through the cache. However, you have two further programs to help you interact with the cache:

ZeroProgress

This program pops up a status box while a download is in progress. Run it with the command /uri/0install/zero-install.sourceforge.net/apps/ZeroProgress/AppRun (nothing will appear until a download starts). You can right-click over an entry in the list to bring up a menu, which can be used to cancel the download.

GUI progress indicator

0refresh
For speed reasons, the cache is never automatically updated. If you know that gimp2.0 is available, but /uri/0install/www.gimp.org only has a gimp1.3 subdirectory then you can run 0refresh to update it:
$ cd /uri/0install/www.gimp.org
$ ls
gimp1.2
gimp1.3
$ 0refresh
$ ls
gimp1.2
gimp1.3
gimp2.0

Running 0refresh updates the index for the whole site, so everything under www.gimp.org will be up-to-date afterwards. You don't have to run it in each subdirectory. Of course, the actual files are still only downloaded when you try to access them.

Documentation for admins

Setting up a computer so that it can use Zero Install is covered in detail in the Install Guide.

You may also be interested in the security model essay.

Generally, you don't need to do anything to install software. That all happens automatically and safely. However, you can override any particular resource using the 0divert command. This command creates a symlink in the /uri/0install filesystem, allowing you to replace resources. For example, if the new ROX-Lib is buggy:

$ alias 0divert=/uri/0install/zero-install.sourceforge.net/bin/0divert
$ cd /uri/0install/rox.sourceforge.net/lib/ROX-Lib2
$ file latest
latest: symbolic link to `ROX-Lib-1.9.9'
$ 0divert latest ROX-Lib-1.9.8
$ file latest
latest: symbolic link to `ROX-Lib-1.9.8'

You can remove the diversion with 0divert -r, and can get a list of current diversions with 0divert -l [site]. Removing a diversion puts things back the way they were:

$ 0divert -l rox.sourceforge.net
/lib/ROX-Lib2/latest -> ROX-Lib-1.9.8 (set Sat Aug 23 14:38:39 2003)
$ 0divert -r latest
$ file latest
latest: symbolic link to `ROX-Lib-1.9.9'

0divert is also useful if there is no binary available for your platform. You can create a directory for the build and use 0divert to create a platform symlink to it, then build there.

Dist-upgrade

If you want to upgrade everything, run 0refresh on every cached site:

$ cd /var/cache/zero-inst
$ for x in *; do 0refresh "$x"; done

This will update every cached index file. The actual data will be fetched on demand.

Cleaning the cache

If you run low on disk space, you can use ZeroClean to find old files in the cache, and remove them:

ZeroClean finds some files to remove