mirror of sx + changes
Go to file
Earnestly 1c4fbda36c sx: traps can explicitly set an exit status
The prior commit 666b87e would still fail if the sx program itself was
killed leaving an xorg server behind.  While trap handlers aren't
typically allowed to change the exit status, if we explicitly exit with
a value then it is honoured.

This works around the subshell setting an exit status of 138 (due to
SIGUSR1) by explicitly using the return value from the last wait or the
last command if the server never started at all.
2017-12-13 13:53:44 +00:00
LICENSE introduce sx 2017-12-01 20:14:54 +00:00
Makefile introduce sx 2017-12-01 20:14:54 +00:00
README doc: mention that the login tty is reused 2017-12-11 16:47:46 +00:00
sx sx: traps can explicitly set an exit status 2017-12-13 13:53:44 +00:00
sx.1 doc: manuals should not have empty lines 2017-12-09 19:51:53 +00:00

README

sx <https://github.com/Earnestly/sx>

INTRODUCTION

  sx is a simple alternative to both xinit(1) and startx(1) for starting
  an Xorg server.

  It started life as a proof of concept while attempting to learn how both
  xinit and startx worked.

  It is not a direct replacement however as it provides a different, more
  limited, interface.

  Some of these major differences are listed here:

    * The server's command-line is hard coded and not exposed to the
      user.
    * The server starts on the same tty the user logged in on.
    * The server doesn't listen on anything except unix domain sockets.
    * The first DISPLAY is 1 instead of 0 contrary to what X(7) suggests.
    * xauth entries are overwritten if the displayname is identical.
    * 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
      tool speak for itself.
    * None of the typical /etc/X11/xinit infrastructure is directly used.
    * Neither XINITRC is honoured nor .xinitrc used.
    * The XDG_CONFIG_HOME/sx/sxrc file is used instead of .xinitrc and is
      required to be executable.

  For a rational on why this exists, the author invites the reader to look
  over the source code for both xinit and startx.

REQUIRES

  * Xorg
  * xauth
  * /dev/urandom

INSTALL

  make PREFIX=/usr DESTDIR=staged install