diff --git a/overlay/rootfs/home/user/.config/sxmo/hooks/sxmo_hook_start.sh b/overlay/rootfs/home/user/.config/sxmo/hooks/sxmo_hook_start.sh index 1096a81..ddc3659 100755 --- a/overlay/rootfs/home/user/.config/sxmo/hooks/sxmo_hook_start.sh +++ b/overlay/rootfs/home/user/.config/sxmo/hooks/sxmo_hook_start.sh @@ -36,8 +36,8 @@ if [ -z "$SXMO_NO_AUDIO" ]; then superctl start pulseaudio elif [ "$(command -v pipewire)" ]; then # pipewire-pulse will start pipewire - superctl start pipewire-pulse - superctl start wireplumber + pidof -s pipewire >/dev/null 2>&1 || superctl start pipewire-pulse + pidof -s wireplumber >/dev/null 2>&1 || superctl start wireplumber fi fi diff --git a/overlay/rootfs/usr/bin/bananarchy-x11-session.sh b/overlay/rootfs/usr/bin/bananarchy-x11-session.sh index 745130f..2d0d980 100755 --- a/overlay/rootfs/usr/bin/bananarchy-x11-session.sh +++ b/overlay/rootfs/usr/bin/bananarchy-x11-session.sh @@ -42,10 +42,11 @@ if [ -d /home/user/.local/x11 ]; then rm -rf /tmp/x11 ln -s /home/user/.local/x11 /tmp/x11 cp -f /home/user/.local/x11/xorg-bananarchy.conf /tmp/xorg-bananarchy.conf 2>/dev/null || true + XORG_CONFIG="/tmp/xorg-bananarchy.conf" else export FCITX_ADDON_DIRS=/home/user/.local/lib/fcitx5:/usr/lib/fcitx5 export PATH=/home/user/.local/bin:/home/user/.config/sxmo/hooks:/usr/share/sxmo/default_hooks:/usr/local/bin:/usr/bin:/bin:/sbin:/usr/sbin - cp -f /etc/X11/xorg.conf.d/10-bananarchy-msm8909.conf /tmp/xorg-bananarchy.conf 2>/dev/null || true + XORG_CONFIG="xorg.conf.d/10-bananarchy-msm8909.conf" fi unset WAYLAND_DISPLAY @@ -66,7 +67,7 @@ XORG_MODPATH="/usr/lib/xorg/modules/xlibre-25,/usr/lib/xorg/modules" [ -d /tmp/x11/usr/lib/xorg/modules ] && XORG_MODPATH="/tmp/x11/usr/lib/xorg/modules/xlibre-25,/tmp/x11/usr/lib/xorg/modules" if ! pidof -s Xorg >/dev/null 2>&1; then - "$XORG_BIN" :0 -s 0 -dpms -nocursor -nolisten tcp -config /tmp/xorg-bananarchy.conf -modulepath "$XORG_MODPATH" -logfile /tmp/Xorg.0.log >/dev/null 2>&1 /dev/null 2>&1 /dev/null 2>&1; then diff --git a/overlay/rootfs/usr/share/sxmo/default_hooks/sxmo_hook_start.sh b/overlay/rootfs/usr/share/sxmo/default_hooks/sxmo_hook_start.sh index 1096a81..ddc3659 100755 --- a/overlay/rootfs/usr/share/sxmo/default_hooks/sxmo_hook_start.sh +++ b/overlay/rootfs/usr/share/sxmo/default_hooks/sxmo_hook_start.sh @@ -36,8 +36,8 @@ if [ -z "$SXMO_NO_AUDIO" ]; then superctl start pulseaudio elif [ "$(command -v pipewire)" ]; then # pipewire-pulse will start pipewire - superctl start pipewire-pulse - superctl start wireplumber + pidof -s pipewire >/dev/null 2>&1 || superctl start pipewire-pulse + pidof -s wireplumber >/dev/null 2>&1 || superctl start wireplumber fi fi diff --git a/rebuild-image.sh b/rebuild-image.sh index 2af0086..db1f27c 100755 --- a/rebuild-image.sh +++ b/rebuild-image.sh @@ -141,11 +141,14 @@ EOF chown 0:5 "$ROOTFS/usr/bin/wall" chmod 2755 "$ROOTFS/usr/bin/wall" fi + if [ -e "$ROOTFS/usr/bin/Xorg" ] && [ ! -L "$ROOTFS/usr/bin/Xorg" ]; then + chown 0:0 "$ROOTFS/usr/bin/Xorg" + chmod 0755 "$ROOTFS/usr/bin/Xorg" + fi for suid_bin in \ "$ROOTFS/bin/su" \ "$ROOTFS/bin/mount" \ "$ROOTFS/bin/umount" \ - "$ROOTFS/usr/bin/Xorg" \ "$ROOTFS/usr/bin/doas" \ "$ROOTFS/usr/bin/sudo" \ "$ROOTFS/usr/bin/pkexec" \