Xselection is a command line program to set an X selection to the content read from standard input. It was written with the intent of handling sensitive material, such as passwords, with extra care. In particular, it prevents the buffer in which the selection is stored from being swapped out to disk by use of mlock and overwrites this buffer with zeros before exiting. By default, it only serves its selection once and then terminates. Furthermore, it terminates automatically after a configurable timeout.
Xselection only depends on Xlib (1.8.4), a C99 compiler and a POSIX-compatible make.
The build system is based on (hopefully) portable Makefiles. In order to build, simply run:
$ make
If you happen to have the aforementioned library in an esoteric location, please set the environment variables CFLAGS and LDFLAGS accordingly, or simply edit the Makefile to suit your system. For example:
$ LDFLAGS=-I/usr/local/include CFLAGS=-L/usr/local/lib make
Installation can be performed with the "install" target of the Makefile; note, however, that you MUST set the environment variable DESTDIR to point to the location at which you wish to install xselection:
$ DESTDIR=/my/staging/directory make install
It is recommended to not run "make install" as root and instead use some unprivileged staging location and then copy the resulting files manually as root.
Copyright © 2021 B.R.S. Roso.
Xselection is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License version 3 as published by the Free Software Foundation.
This program is distributed in the hope that it be useful but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with Xselection. If not, see https://www.gnu.org/licenses.