summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/x11-common/xserver-nodm-init/X11/Xsession.d/13xdgbasedirs.sh
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-graphics/x11-common/xserver-nodm-init/X11/Xsession.d/13xdgbasedirs.sh')
-rw-r--r--meta/recipes-graphics/x11-common/xserver-nodm-init/X11/Xsession.d/13xdgbasedirs.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/meta/recipes-graphics/x11-common/xserver-nodm-init/X11/Xsession.d/13xdgbasedirs.sh b/meta/recipes-graphics/x11-common/xserver-nodm-init/X11/Xsession.d/13xdgbasedirs.sh
new file mode 100644
index 0000000000..6bd40b2fc5
--- /dev/null
+++ b/meta/recipes-graphics/x11-common/xserver-nodm-init/X11/Xsession.d/13xdgbasedirs.sh
@@ -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 "$XDG_RUNTIME_DIR" ]; then
+ XDG_RUNTIME_DIR="/tmp"
+ export XDG_RUNTIME_DIR
+fi