[neon/snap-packaging/plasma-desktop-session] scripts: Fix XDG_RUNTIME_DIR value in systemd

Kevin Ottens null at kde.org
Wed Oct 2 14:31:52 BST 2024


Git commit a1b04636d1704bce5fc793996233aa166820e37f by Kevin Ottens, on behalf of Antoine Gonzalez.
Committed on 02/10/2024 at 13:27.
Pushed by ervin into branch 'master'.

Fix XDG_RUNTIME_DIR value in systemd

Currently, this variable inherits the snap-specific directory instead of
the /run/user/1000 general directory which is only set after
startplasma. This means any service launched by systemd would have the
plasma-desktop-session specific directory which could cause problems.

The fix is to explicitly set the variable to the general directory
before startplasma, so systemd is launched with the correct value.

M  +1    -0    scripts/run-session.sh

https://invent.kde.org/neon/snap-packaging/plasma-desktop-session/-/commit/a1b04636d1704bce5fc793996233aa166820e37f

diff --git a/scripts/run-session.sh b/scripts/run-session.sh
index 7d51997..6c4b179 100755
--- a/scripts/run-session.sh
+++ b/scripts/run-session.sh
@@ -12,6 +12,7 @@ mkdir -p /tmp/.X11-unix /tmp/.ICE-unix
 chmod 01777 /tmp/.X11-unix /tmp/.ICE-unix
 
 # Create the runtime directory
+export XDG_RUNTIME_DIR=/run/user/`id -u`
 mkdir -p --mode=700 $XDG_RUNTIME_DIR
 chmod 700 $XDG_RUNTIME_DIR
 


More information about the Neon-commits mailing list