NAME
xclipboard − X clipboard client.
SYNTAX
xclipboard [options]
DESCRIPTION
The xclipboard program is used to collect and display text selections that are sent to the CLIPBOARD by other clients. It is typically used to save CLIPBOARD selections for later use. Chapter 5, The xterm Terminal Emulator, describes how to use the xclipboard client. See Chapter 11, Setting Resources, for instructions on customizing xterm to send selections to the CLIPBOARD.
Since xclipboard uses a Text widget to display the contents of the clipboard, text sent to the CLIPBOARD may be reselected for use in other applications. The contents may also be edited, using any of the editing commands built into the Text widget. (See the reference page for xedit for details.)
xclipboard stores each CLIPBOARD selection as a separate string, each of which can be selected. Each time CLIPBOARD is asserted by another application, xclipboard transfers the contents of that selection to a new buffer and displays it in the text window. Buffers are never automatically deleted, so you’ll want to use the delete button to get rid of useless items.
xclipboard also responds to requests for the CLIPBOARD selection from other clients by sending the entire contents of the currently displayed buffer.
An xclipboard window has the following buttons across the top:
QuitExits xclipboard.
DeleteDeletes current buffer and displays the next one.
NewCreates a new buffer with no contents. Useful in constructing a new CLIPBOARD selection by hand.
SaveSaves the currently displayed selection to a file. Available as of Release 5.
NextDisplays the next buffer in the list.
PreviousDisplays the previous buffer.
To the right of these command buttons is a small box displaying a number corresponding to the selection being displayed. The box has been added in Release 5.
OPTIONS
xclipboard accepts all of the standard X Toolkit command-line options, which are listed on the X reference page. In addition, xclipboard accepts the following application-specific options:
−nwIndicates that long lines of text should not wrap around. This is the default behavior.
−wIndicates that lines of text that are too long to be displayed on one line in the clipboard should wrap around to the following lines.
RESOURCES
xclipboard understands all of the Core resource names and classes, as well as the following application-specific resource:
wrap (class Wrap)
If True, lines of text that are too long to be displayed on one line in the clipboard will wrap around to the following lines. If False (the default), long lines will not wrap.
SENDING AND RETRIEVING CLIPBOARD CONTENTS
Text is copied to the clipboard whenever a client asserts ownership of the CLIPBOARD selection. Text is copied from the clipboard whenever a client requests the contents of the CLIPBOARD selection. This doesn’t necessarily happen automatically; you must add translations for each application that you want to have work with xclipboard. Examples of event bindings that a user may wish to include in a resource configuration file to use the clipboard from xterm are: ∗VT100.Translations: #override \n\
Button1 <Btn3Down>: select-end(PRIMARY,CUT_BUFFER0,CLIPBOARD)\n\
!Shift <Btn2Up>: insert-selection(CLIPBOARD)\n\
~Shift ~Ctrl ~Meta <Btn2Up>: insert-selection(PRIMARY,CUT_BUFFER0) The first translation, Button1 <Btn3Down>: select-end(CLIPBOARD,CUT_BUFFER0,CLIPBOARD), specifies that if button 3 is pressed while button 1 is held down, the selection will be made the PRIMARY selection, copied to CUT_BUFFER0, and added to the CLIPBOARD. If button 3 isn’t pressed while button 1 is held down, the default xterm translation, namely to add the selection to the PRIMARY selection and CUT_BUFFER0 on any key up, takes effect instead.
The second translation line specifies a way to paste the CLIPBOARD selection (the current contents of the xclipboard window): by holding the Shift key and clicking the second pointer button.
The third translation pastes the contents of the PRIMARY selection, or if that is empty, CUT_BUFFER0. ~Ctrl is specified to keep this translation from conflicting with the translations that invoke the xterm menus; ~Meta prevents a conflict with twm functions. We’ve added ~Shift to prevent a conflict with the action that pastes the CLIPBOARD selection.
WIDGET HIERARCHY
In order to specify resources, it is useful to know the hierarchy of the widgets that compose xclipboard. In the notation below, indentation indicates hierarchical structure. The widget class name is given first, followed by the widget instance name. The first line shows the application class and instance names: XClipboard xclipboard
Form form
Command quit
Command delete
Command new
Command next
Command prev
Text text For information on the resources available in each of the Athena widgets, see Appendix G, Athena Widget Resources.
FILES
/usr/lib/X11/app-defaults/XClipboard
Specifies required resources.
SEE ALSO
X, xterm; Chapter 5, The xterm Terminal Emulator; Chapter 11, Setting Resources; individual client reference pages for the appropriate translations to send selections to the CLIPBOARD.
AUTHORS
Ralph R. Swick, DEC/MIT Project Athena;
Chris Peterson, MIT X Consortium;
Keith Packard, MIT X Consortium.