rwx

Run a programm while X is running

git clone https://git.8pit.net/rwx.git

 1.Dd $Mdocdate: December 26 2017 $
 2.Dt RWX 1
 3.Os
 4.Sh NAME
 5.Nm rwx
 6.Nd run a command while X is running
 7.Sh SYNOPSIS
 8.Nm rwx
 9.Ar command ...
10.Sh DESCRIPTION
11The
12.Nm
13utility opens a connection to the current Xorg
14.Ev DISPLAY
15and keeps it open, afterwards it invokes the specified
16.Ar command
17thereby binding it to the lifetime of a specific display/server.
18If the server does a reset before the command terminates the command
19receives a SIGHUP.
20.Pp
21The main purpose of
22.Nm
23is invoking commands from your
24.Pa .xsession
25or
26.Pa .xinitrc
27startup file and making sure that these commands terminate when your X
28server does.
29.Sh ENVIRONMENT
30.Bl -tag -width DISPLAY
31.It Ev DISPLAY
32.br
33Name of the X display to connect to.
34.El
35.Sh EXIT STATUS
36If the specfied
37.Ar command
38terminates before the X server,
39.Nm
40exits with the exit status of the spawned command.
41If the X server does a reset before the command completes
42.Nm
43exits with the exit status zero.
44.Pp
45If an error occurs, e.g. if
46.Nm
47couldn't open a connection to the current
48.Ev DISPLAY
49or if the given
50.Ar command
51couldn't be invoked
52.Nm
53exits with a non-zero exit status.
54.Sh EXAMPLES
55An example for a program that is usally invoked by the startup files
56mentioned above is
57.Xr redshift 1
58to start it using
59.Nm
60you would add the following to your startup file:
61.Pp
62.Dl rwx redshift -l 23.42:13.37 >/dev/null &
63.Sh AUTHORS
64.An Sören Tempel Aq Mt soeren@soeren-tempel.net
65.Sh BUGS
66This utility is a horrible hack.