Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Working with clipboard can be like a hell. Sometimes Ctrl+C just don't work and if you copy some text on, say, web browser you can't normally paste in somewhere else. Especially between Terminal and other programs. Sometmies you have to paste with Ctrl+Shift+Insert sometimes Ctrl+V.

Is there any way to unify handling clipboard?

share|improve this question
up vote 3 down vote accepted

You can bind the copy-paste to middle click using xsel and xvkbd.

First, install the packages:

sudo apt-get install xsel xvkbd

Now, run the following command:

sh -c 'xsel | xvkbd -xsendevent -file - 2>/dev/null'

You can also bind this to a keyboard shortcut from System Settings > Keyboard > Shortcuts.

More on xsel:

Taken from

The xsel tool, copyfree software available via the software management systems of most open source operating systems, is a simple utility meant to serve the need to copy text between the CLI environment and the GUI environment. It effectively acts as a pipeline-like interface between the CLI and the GUI clipboard.

To learn more about xsel, either visit the link above or go here.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.