From b8c45edb31223a6c6919b6838c84f8474a2ce9b5 Mon Sep 17 00:00:00 2001 From: Nameless <22097253+nameless3@users.noreply.github.com> Date: Sat, 12 May 2018 23:30:43 +0200 Subject: [PATCH] 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. --- README | 1 - sx | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/README b/README index 4c57e53..865fc06 100644 --- a/README +++ b/README @@ -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 diff --git a/sx b/sx index 7c49290..5f3e4e5 100755 --- a/sx +++ b/sx @@ -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"