x11-common: set XDG_RUNTIME_DIR if it isn't already set

Wayland needs this set for the communication pipes, so set a fallback in case it
hasn't already been set.

(From OE-Core rev: 263508220674321473a746a137bb5d4b21c55119)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Ross Burton 2013-01-16 12:59:08 +00:00 committed by Richard Purdie
parent 2ad1894520
commit 1e1db8439b
1 changed files with 13 additions and 0 deletions

View File

@ -0,0 +1,13 @@
# Minimal/stub implementation of the XDG Base Directory specification.
# http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
#
# Wayland needs XDG_RUNTIME_DIR, so set it to /tmp. This isn't compliant with
# the specification (wrong mode, wrong owner) but it's mostly sufficient.
#
# In the ideal case where SystemD is booting and userspace is initiated by a
# SystemD user session this will have been set already, so don't overwrite it.
if [ -z "$XGD_RUNTIME_DIR" ]; then
XDG_RUNTIME_DIR="/tmp"
export XDG_RUNTIME_DIR
fi