mirror of sx + changes
Go to file
earnestly 2ef0b3bf03 sx: The signal saga concludes
This ought to be the last effort on signal handling.

Prior to this design the resending of the signals was ineffective due to
the cleanup function explicitly calling exit.  As a result this would
prevent the subsequent commands in the trap from executing.

Instead a variable is employed to guard the exit on condition of not
receiving an INT signal.  On UNIX systems this particular signal needs
to be resent such that the calling program knows the process was
interrupted.  See https://www.cons.org/cracauer/sigint.html

This situation exists because, besides bash, all shells treat EXIT traps
as a mechanism to execute code after the program ends, as if the code it
runs was pasted at the end of the file, rather than to run it however the
program terminated.
2021-07-04 16:20:40 +01:00
LICENSE introduce sx 2017-12-01 20:14:54 +00:00
Makefile make: use more GNU directory variables 2020-05-21 21:59:02 +01:00
README doc: Further rationale 2021-07-04 15:08:20 +01:00
sx sx: The signal saga concludes 2021-07-04 16:20:40 +01:00
sx.1 sx: further tuning the signal situation 2020-10-06 19:31:07 +01: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 while taking up the offer presented in startx:

    > Site administrators are STRONGLY urged to write nicer versions.

  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 doesn't listen on anything except unix domain sockets.
    * The server starts on the same tty the user logged in on.
    * The first DISPLAY is 1 instead of 0 contrary to what X(7) suggests
      as it is coupled to the tty number.
    * 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.
    * While XAUTHORITY is still honoured, $XDG_DATA_HOME/sx/xauthfile is
      used by default 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 rationale 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 install