Splux Linux

source-based Linux using SPS

SPS · log · files · refs · tags · releases · people · languages · GitHub · file

lib/mkiso/live-plasma-session


2170 bytes at 2909919 · GitHub

#!/bin/busybox sh
# Session started by kwin_wayland --exit-with-session. When this script
# (or plasmashell) exits, KWin exits and busybox init respawns live-plasma.

PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
PATH=/usr/lib64/qt6/bin:/usr/lib/qt6/bin:$PATH
export PATH
export HOME=${HOME:-/root}
export XDG_RUNTIME_DIR=${XDG_RUNTIME_DIR:-/run/user/0}
export XDG_SESSION_TYPE=wayland
export XDG_SESSION_CLASS=user
export XDG_SESSION_DESKTOP=KDE
export XDG_CURRENT_DESKTOP=KDE
export DESKTOP_SESSION=plasma
export MOZ_ENABLE_WAYLAND=1
export MOZ_ALLOW_DOWNGRADE=1

if command -v kded6 >/dev/null 2>&1; then
	kded6 >/run/kded6.log 2>&1 &
fi
if command -v kglobalacceld >/dev/null 2>&1; then
	kglobalacceld >/run/kglobalaccel.log 2>&1 &
elif [ -x /usr/libexec/kglobalacceld ]; then
	/usr/libexec/kglobalacceld >/run/kglobalaccel.log 2>&1 &
fi
if [ -x /usr/libexec/kactivitymanagerd ]; then
	/usr/libexec/kactivitymanagerd >/run/kactivity.log 2>&1 &
fi
if [ -x /usr/libexec/kf6/kiod6 ]; then
	/usr/libexec/kf6/kiod6 >/run/kiod6.log 2>&1 &
fi
if command -v pipewire >/dev/null 2>&1; then
	pipewire >/run/sps-pipewire.log 2>&1 &
fi
if command -v wireplumber >/dev/null 2>&1; then
	wireplumber >/run/sps-wireplumber.log 2>&1 &
fi
if command -v pipewire-pulse >/dev/null 2>&1; then
	pipewire-pulse >/run/sps-pipewire-pulse.log 2>&1 &
fi
if [ -x /usr/libexec/xdg-desktop-portal ]; then
	/usr/libexec/xdg-desktop-portal >/run/sps-portal.log 2>&1 &
fi
if [ -x /usr/libexec/xdg-desktop-portal-kde ]; then
	/usr/libexec/xdg-desktop-portal-kde >/run/sps-portal-kde.log 2>&1 &
fi
if [ -x /usr/libexec/polkit-kde-authentication-agent-1 ]; then
	/usr/libexec/polkit-kde-authentication-agent-1 \
		>/run/sps-polkit-agent.log 2>&1 &
fi

if command -v plasma-welcome >/dev/null 2>&1; then
	(
		n=0
		while [ "$n" -lt 20 ]; do
			if [ -n "${WAYLAND_DISPLAY:-}" ] ||
			   [ -S "$XDG_RUNTIME_DIR/wayland-0" ]
			then
				break
			fi
			n=$((n + 1))
			sleep 1
		done
		sleep 3
		plasma-welcome
	) >/run/plasma-welcome.log 2>&1 &
fi

if command -v plasmashell >/dev/null 2>&1; then
	exec plasmashell
fi
printf '%s\n' "SPS: plasmashell is not on this image."
exec /bin/sh