blob: 91594b9e3d33fc7d71da27f0eca66c2e46abf7c6 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001# Minimal/stub implementation of the XDG Base Directory specification.
2# http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
3#
4# Wayland needs XDG_RUNTIME_DIR, so set it to /tmp. This isn't compliant with
5# the specification (wrong mode, wrong owner) but it's mostly sufficient.
6#
7# In the ideal case where SystemD is booting and userspace is initiated by a
8# SystemD user session this will have been set already, so don't overwrite it.
9
10if [ -z "$XGD_RUNTIME_DIR" ]; then
11 XDG_RUNTIME_DIR="/tmp"
12 export XDG_RUNTIME_DIR
13fi