Application directories

This document details the application directory system, as used in the ROX desktop. Comments are welcome. Programmers writing programs which have nothing to do with the ROX Desktop are still encouraged to consider using this system.

Normally, Unix programs are installed by running a script (possibly inside a Makefile or RPM package) as root. This script scatters files over the filesystem (hopefully without breaking anything). If you're lucky, you may get the option of uninstalling afterwards. It might even work!

Installing programs with this scheme usually requires root access, or a lot of trouble. Sometimes both.

Application directories are self contained applications. The directory contains the program's help files, images, binaries and possibly other things. They may still depend on other libraries, though.

An application directory does not normally need an installer - you can just move it wherever you want. You can `uninstall' an application by deleting the directory. You can run an application directory by clicking on it.

First, I'd like to make a few points clear:

You might also like to read:


Wrappers are tiny application directories which just run an already-installed version of the program. This is useful when you have a lot of non-application-directory packaged software installed already.

See Peter Geer's Wrappers page and the ROX-Wrap project for details.

However, note that ROX-Filer now supports .desktop files. You can often find these in /usr/share/applications or some similar location.

Re-packaging a program as an application directory

The simplest case is something like tgif where you just have an executable and a help file.
The steps would then be:

  1. Create a directory called 'TGIF'
  2. Move the executable inside as 'AppRun'
  3. Put a PNG format icon inside as '.DirIcon'
  4. Create a subdirectory called 'Help' and put the docs inside that
  5. Optionally, create an AppInfo.xml file as explained in the filer's manual (this can be used to show a tooltip for the application, etc).

You should be able to run the application now by clicking on it, copy it to another machine by copying the directory, etc.
For something like Vim with resource files the steps are similar, but put the resources (vim-runtime) into a subdirectory and make the AppRun a shell script that sets the VIMRUNTIME environment variable and runs the binary, eg:


APP_DIR=`dirname $0`
APP_DIR=`cd "$APP_DIR";pwd`

exec "$APP_DIR/Vim" "$@"

For applications which have the pathnames of their resources hard-coded you will need to edit the source code. This guide shows how:

Library Directories

LibDirs are a special case of application directories. They are implemented the same but their use differs in two ways:

They are mainly used to provide libraries:

but can also used to provide other resources:


What about all my existing applications, as installed by RPM/DEB packages?

"Changing the current system to application directories seems like a big change. It also destroys much of the 'old' systems' advantages like automatic updates and dependancy handling, because the packaging systems don't know where you dropped your application directory."

Plain AppDirs do make automatic updates difficult. However, even if you get a package manager to place them in a central directory it's still worth-while keeping each download in its own directory. It prevents conflicts between packages and makes uninstall easier. This is what AddApp does, although this does mean that deleting a launcher doesn't remove the application (instead, you need a cache cleaner similar to APT's deborphan to work out what is no longer required).

"It seems like a great idea, but I'm sure some people have doubts (just as I do right now) as in how to integrate it with current systems. So: How can I integrate existing apps in /usr/bin etc. into Rox? Do I have to create links, or can I create menus, etc?" -- Jens Benecke

You can link executables in /usr/bin to your Apps directory or panel (or run them in place), but you'll have to add the icons manually. A better way is to use the .desktop files usually found in /usr/share/applications; that way they have an icon and a tooltip too.