XSEL(1) BSD Reference Manual XSEL(1)
xsel - manipulate the X selection
xsel [-abcdfhiknopsVvx] [-l logfile] [-t timeout]
The X server maintains three selections, called PRIMARY, SECONDARY and CLIPBOARD. Normally, the PRIMARY selection is only accessible by manually highlighting information and pasting with the middle mouse button, the SECONDARY selection is less frequently used by application programmes, and the CLIPBOARD is only available to Copy/Cut/Paste commands of GUI ap- plications. XSel is a command-line utility to manipulate the selections. By default, XSel operates on the PRIMARY selection. It sets the selection to data read from standard input, if standard output is a tty and stan- dard input is not; otherwise, it prints the current content of the selec- tion. If both input and output mode are selected, the previous content of the selection is output, then the data read from standard input is stored as the new content of the selection. The options are as follows: -a Append input to the selection instead of replacing it. -b Operate on the CLIPBOARD selection. -c Clear the selection. -d Request that the selection be cleared and the application owning it delete its contents. -f Follow input and append it to the selection as it grows. -h Display the usage and exit. -i Store input into the selection. -k Keep the currently set PRIMARY and SECONDARY selections in persistent memory by taking them over, so they can be ac- cessed even if the originating programme terminates. See CAVEATS for details. -l logfile Write errors to logfile when detached. Default: ~/.etc/xsel.log -n Do not detach from the controlling tty. -o Output current content of the selection. -p Operate on the PRIMARY selection (default). -s Operate on the SECONDARY selection. -t timeout Specify the timeout in milliseconds within which the selec- tion must have been retrieved. A value of 0 (default) speci- fies no timeout. -V Display the version and exit. -v Increase verbosity, print informative messages. -x Exchange the contents of the PRIMARY and SECONDARY selections with each other.
Similar to tail -f, follow a growing file and append to the selection: $ xsel -f </var/log/messages
tail(1), Xserver(1), xset(1), xclipboard(1), xpaste(1), X(7) http://www.vergenet.net/~conrad/software/xsel/
XSel conforms to the X Window System Inter-Client Communication Conven- tions Manual Version 2.0 (ICCCM2), including correct handling of TARGETS, MULTIPLE, TIMESTAMP, and DELETE targets, INCR properties and large data transfers. The author's thoughts on ICCCM (Warning: explicit language) are available at: http://lists.slug.org.au/archives/slug-chat/2001/July/msg00054.html
XSel was written by Conrad Parker <email@example.com>. Sergey Kogan <firstname.lastname@example.org> provided UTF-8 support. The mdoc(7) format manpage was cobbled together by Thorsten Glaser <email@example.com>.
There is no X selection buffer. The selection mechanism in X11 is an in- terclient communication mediated by the X server each time any program wishes to know the selection contents, eg. to perform a middle mouse but- ton paste. In order to implement modification of the selection(s) (in in- put, keep and exchange modes) this utility detaches from the terminal, spawning a child process to supply the new selection(s) on demand. This daemon(3) process exits immediately when any other programme takes over the selection(s), eg. when the user next selects some text in a terminal window, or by running xsel -c. MirOS BSD #10-current June 7, 2011 1
Generated on 2016-02-08 23:56:27 by $MirOS: src/scripts/roff2htm,v 1.82 2016/01/02 20:05:08 tg Exp $
These manual pages and other documentation are copyrighted by their respective writers;
their source is available at our CVSweb,
AnonCVS, and other mirrors. The rest is Copyright © 2002–2016 The MirOS Project, Germany.
This product includes material provided by mirabilos.
This manual page’s HTML representation is supposed to be valid XHTML/1.1; if not, please send a bug report – diffs preferred.