Skip to main content

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

Project description


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


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:


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

NOTE: xpaste now works with Wayland as well: it uses /dev/uinput to attach a virtual keyboard.


xsel(1), crikey(1)

Project details

Download files

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

Source Distribution

xpaste-1.6.tar.gz (21.3 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page