# Environment

The environment variables that have an effect on how fvwm operates are the following:

`DISPLAY`

  Fvwm starts on this display unless the `-display` option is given.

`FVWM_MODULEDIR`

  Set by fvwm to the directory containing the standard fvwm modules.

`FVWM_USERDIR`

  Used to determine the user's data directory for reading and sometimes writing personal files. If this variable is not already set, it is set by fvwm to `$HOME/.fvwm`, which is the default user's data directory.

`SESSION_MANAGER`

  Fvwm tries to contact this session manager.

`SESSION_MANAGER_NAME`

  This is used mainly to determine xsm running to work around its bug. If this variable is set to "xsm", DiscardCommand is set as xsm expects it and not as XSMP requires. If you run fvwm under xsm, you should set this variable to "xsm", otherwise old state files are not removed.

`SM_SAVE_DIR`

  If this is set, fvwm saves its session data in this directory. Otherwise it uses `$HOME`. Note, the state files are named `.fs-??????` and normally are removed automatically when not used anymore.