diff options
author | Pascal Rigaux <pixel@mandriva.com> | 1999-12-21 18:42:28 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 1999-12-21 18:42:28 +0000 |
commit | e1db87b9b9e4a582e106fb9f24e6be21c8fa0917 (patch) | |
tree | 15f651db405961c6249524848702e4f656bb28c3 /tools/xhost+.c | |
parent | 636afb483acfe3dd3f668b88cd484f10a8fa3e20 (diff) | |
download | drakx-e1db87b9b9e4a582e106fb9f24e6be21c8fa0917.tar drakx-e1db87b9b9e4a582e106fb9f24e6be21c8fa0917.tar.gz drakx-e1db87b9b9e4a582e106fb9f24e6be21c8fa0917.tar.bz2 drakx-e1db87b9b9e4a582e106fb9f24e6be21c8fa0917.tar.xz drakx-e1db87b9b9e4a582e106fb9f24e6be21c8fa0917.zip |
no_comment
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); +} |