1XSEL(1x)                                                              XSEL(1x)
2
3
4

NAME

6       xsel - manipulate the X selection.
7

SYNOPSIS

9       xsel [OPTION]...
10

DESCRIPTION

12       Retrieve and set the X selection.
13
14       The  X server maintains three selections, called PRIMARY, SECONDARY and
15       CLIPBOARD. The PRIMARY selection is conventionally  used  to  implement
16       copying  and  pasting  via  the  middle mouse button. The SECONDARY and
17       CLIPBOARD selections are less frequently used by application  programs.
18       This  program operates on the PRIMARY selection unless otherwise speci‐
19       fied.
20
21       By default, this program outputs the selection without modification  if
22       both  standard  input  and standard output are terminals (ttys). Other‐
23       wise, the current selection is output if standard output is not a  ter‐
24       minal  (tty),  and the selection is set from standard input if standard
25       input is not a terminal (tty). If any input or output options are given
26       then the program behaves only in the requested mode.
27
28       If  both  input  and  output is required then the previous selection is
29       output before being replaced by the contents of standard input.
30
31
32       Input options
33
34       -a, --append
35              append standard input to the selection. Implies -i.
36
37       -f, --follow
38              append to selection as standard input grows. Implies -i.
39
40       -i, --input
41              read standard input into the selection.
42
43
44       Output options
45
46       -o, --output
47              write the selection to standard output.
48
49
50       Action options
51
52       -c, --clear
53              clear the selection. Overrides all input options.
54
55       -d, --delete
56              Request that the current selection be  deleted.  This  not  only
57              clears  the selection, but also requests to the program in which
58              the selection resides that the  selected  contents  be  deleted.
59              Overrides all input options.
60
61
62       Selection options
63
64       -p, --primary
65              operate on the PRIMARY selection (default).
66
67       -s, --secondary
68              operate on the SECONDARY selection.
69
70       -b, --clipboard
71              operate on the CLIPBOARD selection.
72
73
74       -k, --keep
75              Do not modify the selections, but make the PRIMARY and SECONDARY
76              selections persist even after the programs they were selected in
77              exit. (Conventionally, the CLIPBOARD selection is persisted by a
78              separate special purpose program such as xclipboard(1)). Ignores
79              all input and output options.
80
81       -x, --exchange
82              exchange the PRIMARY and SECONDARY selections. Ignores all input
83              and output options.
84
85
86       X options
87
88       -d displayname, --display displayname
89              specify the server to use; see X(1).
90
91       -t ms, --selectionTimeout ms
92              Specify the timeout in milliseconds within which  the  selection
93              must  be  retrieved.  A  value  of 0 (zero) specifies no timeout
94              (default).
95
96
97       Miscellaneous options
98
99       -l filename, --logfile filename
100              Specify the file  to  log  errors  to  when  detached.  (Default
101              $HOME/.xsel.log)
102
103       -n, --nodetach
104              Do  not  detach  from  the  controlling  terminal.  Without this
105              option, xsel will fork to become a background process in  input,
106              exchange and keep modes.
107
108       -h, --help
109              display usage information and exit
110
111       -v, --verbose
112              Print informative messages. Additional instances of -v raise the
113              debugging level, ie. print more information.
114
115       --version
116              output version information and exit
117

NOTES

119       There is no X selection buffer. The selection mechanism in  X11  is  an
120       interclient  communication  mediated by the X server each time any pro‐
121       gram wishes to know the selection contents, eg.  to  perform  a  middle
122       mouse  button  paste.  In order to implement modification of the selec‐
123       tion(s) (in input, keep and exchange modes) this program detaches  from
124       the  terminal,  spawning a child process to supply the new selection(s)
125       on demand. This child exits immediately when any  other  program  takes
126       over  the  selection(s),  eg. when the user next selects some text in a
127       terminal window or by running xsel -c.
128

STANDARDS

130       xsel conforms to the Inter-Client Communication Conventions Manual Ver‐
131       sion 2.0 (ICCCM2).
132

SEE ALSO

134       X(7), Xserver(1), xset(1), xclipboard(1), xpaste(1)
135

AUTHOR

137       Conrad Parker <conrad@vergenet.net>, July 2001
138
139
140
141                                 January 2008                         XSEL(1x)
Impressum