xselection

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.


Releases

v1.0
Release date: 11 May 2024
xselection_1.0.tar.bz2
xselection_1.0.tar.bz2.sig
SHA256:c57a35e7fbd1c30818d7de173fdbcafdc1e0b10eb9a75c8ea1eafdb3805cb937
The GPG key with which all releases are signed can be found at https://www.roso93.net/index.html.

Dependencies

Xselection only depends on Xlib (1.8.4), a C99 compiler and a POSIX-compatible make.


Compilation

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

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.


Contact

B.R.S. Roso


Notice

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.