# set-clipboard

Source: https://libtmux.org/en/tmux/3.7c/catalog/options/set-clipboard/

> Attempt to set the terminal clipboard content using the xterm(1) escape sequence, if there is an Ms entry in the terminfo(5) description (see the TERMINFO EXTENSIONS section).

option tmux3.7c

Attempt to set the terminal clipboard content using the xterm(1) escape sequence, if there is an Ms entry in the terminfo(5) description (see the TERMINFO EXTENSIONS section).

* Scope

  server

* Type

  Choice

* Default

  `external`

* Values

  `off` `external` `on`

* Set

  [`set-option`](https://libtmux.org/en/tmux/3.7c/manual/set-option/) `-s set-clipboard value`

* Read

  [`show-options`](https://libtmux.org/en/tmux/3.7c/manual/show-options/) `-s set-clipboard`

## Description[#](https://libtmux.org/en/tmux/3.7c/catalog/options/set-clipboard/#description)

Attempt to set the terminal clipboard content using the [xterm(1)]() escape sequence, if there is an *Ms* entry in the [terminfo(5)]() description (see the [TERMINFO EXTENSIONS](https://libtmux.org/en/tmux/3.7c/manual/full/#TERMINFO_EXTENSIONS) section).

If set to `on`, `tmux` will both accept the escape sequence to create a buffer and attempt to set the terminal clipboard. If set to `external`, `tmux` will attempt to set the terminal clipboard but ignore attempts by applications to set `tmux` buffers. If `off`, `tmux` will neither accept the clipboard escape sequence nor attempt to set the clipboard.

Note that this feature needs to be enabled in [xterm(1)]() by setting the resource:

```text
disallowedWindowOps: 20,21,SetXprop
```

Or changing this property from the [xterm(1)]() interactive menu when required.

## Releases[#](https://libtmux.org/en/tmux/3.7c/catalog/options/set-clipboard/#releases)

* [tmux 3.7c](https://libtmux.org/en/tmux/3.7c/catalog/options/set-clipboard/) : present
* [tmux 3.2a](https://libtmux.org/en/tmux/3.2a/catalog/options/set-clipboard/) : present

## Source[#](https://libtmux.org/en/tmux/3.7c/catalog/options/set-clipboard/#source)

* Defined in

  [`options-table.c:508`](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/options-table.c#L508)

* C source reference

  [`options_table`](https://libtmux.org/en/tmux/3.7c/reference/c-variable-options_table/)

* CLI Manual

  [Original manual entry](https://libtmux.org/en/tmux/3.7c/manual/full/#options-set-clipboard)

## Used by[#](https://libtmux.org/en/tmux/3.7c/catalog/options/set-clipboard/#used-by)

Library documentation that names this option.

* Rust

  [`options.generated.SET_CLIPBOARD`](https://libtmux.org/en/rs/latest/reference/options-generated-set_clipboard/)

* Go

  [`tmux.Server.SetClipboard`](https://libtmux.org/en/go/latest/reference/tmux-server-setclipboard/), [`tmux.ServerOptionValues.SetClipboard`](https://libtmux.org/en/go/latest/reference/tmux-serveroptionvalues-setclipboard/), [`tmux.SetClipboard`](https://libtmux.org/en/go/latest/reference/tmux-setclipboard/)
