summaryrefslogtreecommitdiff
path: root/recipes-core/base-files/base-files/wayland-env.sh
diff options
context:
space:
mode:
authorDenys Drozdov <denys.drozdov@toradex.com>2021-03-05 16:45:36 +0200
committerDenys Drozdov <denys.drozdov@toradex.com>2021-03-10 09:27:31 +0000
commit82e3d7b2b56fccabcd52708314acc9dfd6bb24d1 (patch)
tree166e72860a5a8b47cf681c1f98dfe225866a4ac0 /recipes-core/base-files/base-files/wayland-env.sh
parent3384ba4a86592d6095b06355544e00ebc2996654 (diff)
base-files: enable wayland environment in /etc/profile.d
The user running ssh session should be able to run wayland application. Add proper XDG settings, once user logged in /etc/profile.d/wayland-env.sh Related-to: ELB-3448 Signed-off-by: Denys Drozdov <denys.drozdov@toradex.com>
Diffstat (limited to 'recipes-core/base-files/base-files/wayland-env.sh')
-rw-r--r--recipes-core/base-files/base-files/wayland-env.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/recipes-core/base-files/base-files/wayland-env.sh b/recipes-core/base-files/base-files/wayland-env.sh
new file mode 100644
index 0000000..e351296
--- /dev/null
+++ b/recipes-core/base-files/base-files/wayland-env.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+if test -z "$XDG_RUNTIME_DIR"; then
+ export XDG_RUNTIME_DIR=/run/user/`id -u`
+ if ! test -d "$XDG_RUNTIME_DIR"; then
+ mkdir --parents $XDG_RUNTIME_DIR
+ chmod 0700 $XDG_RUNTIME_DIR
+ fi
+
+ export XDG_SESSION_TYPE=unspecified
+ export XDG_SESSION_CLASS=background
+fi
+