diff options
Diffstat (limited to 'tools/xhost+.c')
-rw-r--r-- | tools/xhost+.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/xhost+.c b/tools/xhost+.c new file mode 100644 index 000000000..58781274e --- /dev/null +++ b/tools/xhost+.c @@ -0,0 +1,11 @@ +#include <stdlib.h> +#include <X11/Xlib.h> + + +int main(int argc, char **argv) { + Display *d = XOpenDisplay(getenv("DISPLAY") ? getenv("DISPLAY") : ":0"); + if (d == NULL) exit(1); + XDisableAccessControl(d); + XCloseDisplay(d); + exit(0); +} |