Skip to main content
Help us improve PyPI by participating in user testing. All experience levels needed!

paste text into X windows that don't work with selections

Project description

https://bettercodehub.com/edge/badge/ossobv/xpaste

SYNOPSIS

xpaste <<EOF
This text will be pasted into a window of your choosing.
EOF

DESCRIPTION

Some applications refuse to work with any of the three selection buffers that X/X11/Xorg has: the middle-mouse selection, secondary selection and the CTRL-(SHIFT-)V clipboard selection.

If you have to insert long or difficult to type text (generated passwords), not being able to paste can be troublesome.

xpaste will read the text to paste from standard input, keep it in memory and wait for you to press ENTER. When you do, it pastes the held text into the newly focused window.

See this before/after example where the username is pasted into the SuperMicro ipmiview Java application that doesn’t accept “paste” input through the middle-mouse or CTRL-V:

./xpaste.png

The pasting of text happens through “faked” keypress events. And as you can see from the example, it works.

NOTE: xpaste does not work on Wayland because it disallows applications to meddle with other applications. However, you can start both applications under the Xwayland compatibility layer, e.g. from: WAYLAND_DISPLAY= gnome-terminal

SEE ALSO

xsel(1), crikey(1)

Project details


Release history Release notifications

This version
History Node

1.3

History Node

1.2

History Node

1.1

History Node

1.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
xpaste-1.3.tar.gz (18.7 kB) Copy SHA256 hash SHA256 Source None Apr 13, 2018

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page