MirBSD manpage: xsel(1)

XSEL(1)                      BSD Reference Manual                      XSEL(1)

NAME

     xsel - manipulate the X selection

SYNOPSIS

     xsel [-abcdfhiknopsVvx] [-l logfile] [-t timeout]

DESCRIPTION

     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 programs, and
     the CLIPBOARD is only available to Copy/Cut/Paste commands of GUI appli-
     cations. 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 program 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.

EXAMPLES

     Similar to tail -f, follow a growing file and append to the selection:

           $ xsel -f </var/log/messages

SEE ALSO

     tail(1), Xserver(1), xset(1), xclipboard(1), xpaste(1), X(7)

     http://www.vergenet.net/~conrad/software/xsel/

STANDARDS

     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

AUTHORS

     XSel was written by Conrad Parker <conrad@vergenet.net>.
     Sergey Kogan <kogan@sklad.bacon.ru> provided UTF-8 support.

     The mdoc(7) format manpage was cobbled together by
     Thorsten Glaser <tg@mirbsd.org>.

CAVEATS

     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 program takes over the
     selection(s), eg. when the user next selects some text in a terminal win-
     dow, or by running xsel -c.

MirBSD #10-current             October 7, 2018                               1

Generated on 2021-12-07 11:07:08 by $MirOS: src/scripts/roff2htm,v 1.103 2021/01/23 20:24:35 tg Exp $ — This product includes material provided by mirabilos.

These manual pages and other documentation are copyrighted by their respective writers; their sources are available at the project’s CVSweb, AnonCVS and other mirrors. The rest is Copyright © 2002–2021 MirBSD.

This manual page’s HTML representation is supposed to be valid XHTML/1.1; if not, please send a bug report — diffs preferred.