diff options
author | Ossama Othman <ossama.othman@intel.com> | 2013-05-14 09:48:26 -0700 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2013-05-14 14:36:37 -0400 |
commit | a50e6e4c500e3080b8df7ec14c7e42741477a423 (patch) | |
tree | 0cae5b3f325814e7f2d859eaa3f2c2415c69eb33 /man | |
parent | 95eb3a2eb470bd341ab078c7e48a28ffebc6dde1 (diff) |
config-parser: Honor XDG_CONFIG_DIRS
This set of changes adds support for searching for a given config file
in the directories listed in $XDG_CONFIG_DIRS if it wasn't found in
$XDG_CONFIG_HOME or ~/.config. This allows packages to install custom
config files in /etc/xdg/weston, for example, thus allowing them to
avoid dealing with home directories.
To avoid a TOCTOU race the config file is actually open()ed during the
search. Its file descriptor is returned and stored in the compositor
for later use when performing subsequent config file parses.
Signed-off-by: Ossama Othman <ossama.othman@intel.com>
Diffstat (limited to 'man')
-rw-r--r-- | man/weston.ini.man | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/man/weston.ini.man b/man/weston.ini.man index 22877306..d37654aa 100644 --- a/man/weston.ini.man +++ b/man/weston.ini.man @@ -24,7 +24,10 @@ server is started: .nf .BR "$XDG_CONFIG_HOME/weston.ini " "(if $XDG_CONFIG_HOME is set)" .BR "$HOME/.config/weston.ini " "(if $HOME is set)" -.BR "<current dir>/weston.ini " "(if both variables were not set)" +.B "weston/weston.ini in each" +.BR "\ \ \ \ $XDG_CONFIG_DIR " "(if $XDG_CONFIG_DIRS is set)" +.BR "/etc/xdg/weston/weston.ini " "(if $XDG_CONFIG_DIRS is not set)" +.BR "<current dir>/weston.ini " "(if no variables were set)" .fi .RE .PP @@ -32,7 +35,12 @@ where environment variable .B $HOME is the user's home directory, and .B $XDG_CONFIG_HOME -is the user specific configuration directory. +is the user specific configuration directory, and +.B $XDG_CONFIG_DIRS +is a colon +.B ':' +delimited listed of configuration base directories, such as +.BR /etc/xdg-foo:/etc/xdg . .PP The .I weston.ini |