#72 Allow AppDirs to set environment variables


The patch adds support for a new tag in AppInfo.xml:
<AppDirVar>. If present it should contain the name of a
variable which will be set to the path of the AppDir.

This variable will be set within the filer so that any
subprocess of the filer can access it.

The variable will, currently, only be set on running
the AppDir but a one line addition in
diritem.c->examine_dir() can enable it for the var to
be set on just looking at an AppDir. In this case, the
"overwrite" parameter to filer_boot() would be set to 0.

This will mostly be of use to AppDirs containing
modules for use by other programs, or include files etc.


  • Andrew Flegg

    Andrew Flegg - 2004-05-28

    Provide filer_boot() in filer API

  • Thomas Leonard

    Thomas Leonard - 2004-05-28
    • status: open --> closed
  • Thomas Leonard

    Thomas Leonard - 2004-05-28
    • status: closed --> closed-rejected
  • Thomas Leonard

    Thomas Leonard - 2004-05-28

    Logged In: YES

    Setting on view is really insecure (even if you block
    obvious variables like PATH and LD_PRELOAD, etc). Setting an
    environment variable on run will lead to inconsistancies
    (programs launched from the filer see one variable, programs
    launched from ROX-Menu see another, etc).

    To get the set-on-run behaviour, store the setting in
    CHOICESPATH instead (or XDG_CONFIG_HOME). Get applications
    to read that, then the setting will persist over reboots and
    be seen the same from all applications.

    If you want to find shared resources without needing to run
    the app, see Zero Install (0install.net) for a secure way to
    do this. Or, use a package manager and set the default
    configuration on install.

    You can combine the methods to get secure defaults and


Log in to post a comment.