Adjust sx to work with Xorg 1.20 (and older)

Since Xorg 1.20 the location of the primary binary has changed making it
impossible to support both 1.20 and previous versions.

So instead I'm switching to the `Xorg' command directly which won't
bypass Xorg.wrap in older versions, but since Xorg 1.20, the `Xorg'
command doesn't use it.
This commit is contained in:
Nameless 2018-05-12 23:30:43 +02:00 committed by Earnestly
parent 1c4fbda36c
commit b8c45edb31
2 changed files with 1 additions and 2 deletions

1
README
View File

@ -22,7 +22,6 @@ INTRODUCTION
* Corresponding xauth entries are unconditionally removed when the server
exits.
* The server uses the -noreset flag.
* /usr/lib/xorg-server/Xorg is used directly to bypass Xorg.wrap.
* While XAUTHORITY is still honoured, $XDG_CONFIG_HOME/sx/xauthfile is
used instead of $HOME/.Xauthority
* Very little proxy error checking is used preferring instead to let each

2
sx
View File

@ -40,5 +40,5 @@ xauth add :"$tty" MIT-MAGIC-COOKIE-1 "$(od -An -N16 -tx /dev/urandom | tr -d ' '
# Taking advantage of this feature allows us to launch our client directly
# from the SIGUSR1 handler and avoid the need to poll for server readiness.
trap 'DISPLAY=:$tty "${@:-$cfgdir/sxrc}"' USR1
(trap '' USR1 && exec /usr/lib/xorg-server/Xorg :"$tty" -keeptty vt"$tty" -noreset -auth "$XAUTHORITY") & pid=$!
(trap '' USR1 && exec Xorg :"$tty" -keeptty vt"$tty" -noreset -auth "$XAUTHORITY") & pid=$!
wait "$pid"