Utilities to access the clipboard via OSC52
oscclip is a little, zero dependency python utility which utilizes the system clipboard via OSC52 escape sequences.
Using these sequences, the system clipboard is accessible via SSH as well.
Terminal multiplexers, such as
screen are supported.
Setting the clipboard
$ echo "Foo" | osc-copy
Setting the clipboard and bypass terminal multiplexers
$ echo "Foo" | osc-copy --bypass
Reading the clipboard
$ osc-paste Foo
For a list of terminals that support OSC52, see this table.
There is a bug in
Due to this
osc-paste does not work with
tmux < 3.3 running in
In order to make
allow-passthrough must be enabled.
Check the manpage of
osc-copy issues a warning to
stderr when this option is not set and
--bypass is present.
$ paru -S oscclip
Run via poetry
Check if your distribution provides
poetry via its package management system!
It might be called
python3-poetry or similar!
$ poetry install [--no-dev] $ poetry run ocs-copy
--no-dev omits the development dependencies, such as static code checkers.
Release history Release notifications | RSS feed
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.