summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Drozdov <denys.drozdov@toradex.com>2021-03-05 16:45:36 +0200
committerMax Krummenacher <max.krummenacher@toradex.com>2021-03-23 17:25:48 +0100
commit20fdcaadbdab8070aef031d18d04674a8399c55e (patch)
treea37a45497c313370974ceb05a71f989c61e344f7
parent47765bf628021439a346d7d06503c34d07ab9dbb (diff)
base-files: enable wayland environment in /etc/profile.dHEADmaster
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> (cherry picked from commit 82e3d7b2b56fccabcd52708314acc9dfd6bb24d1)
-rw-r--r--recipes-core/base-files/base-files/wayland-env.sh13
-rw-r--r--recipes-core/base-files/base-files_3.0.14.bbappend2
2 files changed, 15 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
+
diff --git a/recipes-core/base-files/base-files_3.0.14.bbappend b/recipes-core/base-files/base-files_3.0.14.bbappend
index 855bb4e..f52cb85 100644
--- a/recipes-core/base-files/base-files_3.0.14.bbappend
+++ b/recipes-core/base-files/base-files_3.0.14.bbappend
@@ -3,12 +3,14 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/base-files:"
SRC_URI += " \
file://disable_systemd_coloroutput.sh \
file://x11-display-var.sh \
+ file://wayland-env.sh \
"
do_install_append () {
install -m 0755 -d ${D}${sysconfdir}/profile.d
install -m 0644 ${WORKDIR}/disable_systemd_coloroutput.sh ${D}${sysconfdir}/profile.d/
install -m 0644 ${WORKDIR}/x11-display-var.sh ${D}${sysconfdir}/profile.d/
+ install -m 0644 ${WORKDIR}/wayland-env.sh ${D}${sysconfdir}/profile.d/
}
BASEFILESISSUEINSTALL = ""