summaryrefslogtreecommitdiff
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
parent3384ba4a86592d6095b06355544e00ebc2996654 (diff)
base-files: enable wayland environment in /etc/profile.ddunfell-5.x.y
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>
-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 = ""