Run X server as a daemon

Alex Kost 92899f598d guix.scm: Use the latest commit instead of a tagged snapshot 8 роки тому
src 0c5b4fa6bd Initial commit 8 роки тому
.gitignore 992836e579 .gitignore: Add more entries 8 роки тому
AUTHORS 0c5b4fa6bd Initial commit 8 роки тому
COPYING 0c5b4fa6bd Initial commit 8 роки тому
Makefile.am 0c5b4fa6bd Initial commit 8 роки тому
README.org 5cfc7925b0 Update README 8 роки тому
autogen.sh 20d0df6daa Add "autogen.sh" 8 роки тому
configure.ac 0c5b4fa6bd Initial commit 8 роки тому
guix.scm 92899f598d guix.scm: Use the latest commit instead of a tagged snapshot 8 роки тому

README.org

About

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.

Building from Git

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 install

If you are not familiar with the GNU build system, here are some comments:

  • configure phase creates final files from ".in" files ("Makefile",
  • "src/Xdaemon" and "src/Xkill").
  • Actually, invoking make (before make install) does nothing by
  • itself as there is nothing to compile – the ready-to-use scripts are generated during the =configure= phase.
  • Finally, make install installs scripts to /usr/local/bin or another
  • configured directory (see "./configure -h").

Building with Guix

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.