fix(x11): keep /usr/bin/Xorg non-setuid (0755) for rootless elogind startup

This commit is contained in:
Luxferre
2026-10-22 22:30:43 +03:00
parent 179cc3066b
commit 1e14ffdbd0
4 changed files with 11 additions and 7 deletions
@@ -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 &
"$XORG_BIN" :0 -s 0 -dpms -nocursor -nolisten tcp -config "$XORG_CONFIG" -modulepath "$XORG_MODPATH" -logfile /tmp/Xorg.0.log >/dev/null 2>&1 </dev/null &
i=0
while [ "$i" -lt 40 ]; do
if xset s off s noblank s 0 0 -dpms >/dev/null 2>&1; then