There is a wonderful tiny bash script (thanks to Jouke Witteveen for
this beauty!) that turns X server into a daemon. Here is how it works:
when you run this script, it starts X server and catches USR1 signal.
When this signal is received, it means X server is ready to be used by
clients, e.g. you can run a window manager on it, etc. This SIGUSR1
behaviour is documented in man Xserver.
So this Xdaemon script can be used by such service managing programs
as Systemd or Shepherd (I use it in my Shepherd config).
This repository exists because I wanted to make a general-purpose
package that can be built using The GNU Build System. Also I added
Xkill script that allows to kill an X server running on a particular
DISPLAY.
Requirements for building from git:
Run ./autogen.sh to generate the build system infrastructure.
./autogen.sh just runs autoreconf to generate “configure” script.
This phase is not needed for a release that already contains “configure”
and “Makefile.in” files (such a release is generated with “make dist”
command).
After that, the program can be built and installed with the usual sequence of commands of the GNU Build System:
./configure
make
make installIf you are not familiar with the GNU build system, here are some comments:
configurephase creates final files from “.in” files (“Makefile”, “src/Xdaemon” and “src/Xkill”).- Actually, invoking
make(beforemake install) does nothing by itself as there is nothing to compile – the ready-to-use scripts are generated during theconfigurephase. - Finally,
make installinstalls scripts to /usr/local/bin or another configured directory (see “./configure -h”).
This repository contains guix.scm file which can be used to build the
development version of this package with GNU Guix.
A Guix package for the latest release can be found in my guix-config repository.