Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. 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

A common quibble that I have when I'm running X11 on a Linux system is that there doesn't seem to be any X11-wide keyboard shortcuts for copying and pasting. Ctrlc and Ctrlv work fine across most Gtk/Qt applications, but when copying and pasting to/from a terminal emulator, Ctrlc and Ctrlv aren't viable options.

Some terms like gnome-terminal use shortcuts like CtrlShiftc/v, but this still results in an inconsistent copy+paste experience across applications.

OSX, for example, uses the Super/Command key to provide Ctrlc/v shortcuts that function across all OSX (sans X11) applications, and don't interfere with terminal emulators.

Is there any way of getting similar functionality under X11 on Linux?

share|improve this question
One of the issues that you are going to encounter is that Ctrl-c in a terminal is the interrupt signal - I'm not sure that changing that is worth any convenience gained by copy/paste consistency... FWIW, I use this for a relatively seamless experience. – jasonwryan Mar 5 '12 at 19:45
Sorry for the miscommunication -- I'm not looking to bind Ctrl-c to be copy system-wide. I don't want to break terminal emulators. It'd be nice to be able to use something like Super-c/v system-wide so that it wouldn't interfere with any/most applications. – noffle Mar 5 '12 at 21:13
Yes, this is an excellent question and excellent insight. I say that because the same occurred to me. :-) I'm thinking we may need to create our own distro just to show the world that consistent user interfaces can be done in Linux – Dogweather Sep 30 '12 at 6:14
@jasonwryan For whatever reason, I failed to notice the link to muennich/urxvt-perls that your comment included. I realize this was over seven months ago, but: thanks! I still don't have a perfect solution for system-wide shortcuts, but this has proved to be an excellent addition! – noffle Oct 21 '12 at 13:29
Give a try to diyism myboard python version: code.google.com/p/diyism-myboard/downloads/… The issue in it: stackoverflow.com/questions/15270420/… – diyism Mar 21 '13 at 6:40
up vote 3 down vote accepted

I ended up with a partial solution to the problem by installing xbindkeys and setting up the following .xbindkeysrc in my home dir:

"xclip -selection primary -o | xclip -selection clipboard -i"

"sh -c 'xclip -selection clipboard -o | xvkbd -xsendevent -file - 2>/dev/null'"

These shortcuts allow me to copy text into the X11 clipboard from a terminal emulator like urxvt, as well as paste from the X11 clipboard into the terminal emulator. Qt applications work for copying+pasting as well.

However, when using Gtk applications (like Firefox, gedit, etc.) if I tap the Mod4+V to paste, it doesn't seem to work. If I hold the keys down for a few seconds and then release, it pastes fine. Bizarre.

share|improve this answer

One of the easiest solutions I can think about is highlighting text and simply middle mouse clicking where you wish to paste that text. Be careful how you do this though, often the end of the copied line is a new line and can cause problems if you're in a shell.

share|improve this answer
I'm aware of the selection clipboard, but it falls short for two reasons: 1) I'm looking for a set of keyboard shortcuts, 2) selecting any other text, even accidentally, nukes whatever (likely more important) text I had selected. – noffle Mar 5 '12 at 19:01
As another alternative that alleviates the issue #1. You can try the solution provided here. – Linztm Mar 5 '12 at 19:22
Linztm: Thanks for that. I ended up using this as part of my solution. – noffle Mar 6 '12 at 2:45

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.