Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Typical scenario: I want to get a snippet from a text file into my terminal (probably running a VIM).

Now I open the file using mousepad, select the snippet, close mousepad, switch to urxvt and hit Shift + Insert to paste the text. (As opposed to non-terminal applications, where the same does the "normal" paste, but let's keep that aside for now).

IIRC, this work-flow used to work perfectly, until a certain moment. Now, since the moment I close the mousepad window, contents of the clipboard is lost, i.e. reverted to that before. Of course I don't want to keep the window open, that only leads to cluttered desktop (= random loss my concentration).

Skip this: Is there any rationale for this? I'm tempted to think that this is some kind of security measure, but frankly, that idea seems so scary to me: I mean, it's supposed to be clipboard, right? Not a VCS nor a password manager, just a plain old simple clipboard. (What next, are we going to have separate cursors in applications? Or separate selections? Or five hands?)

How can I get my old normal clipboard behavior? And by the way, which part of the architecture (X/GTK/Xfce/mousepad) is responsible for this behavior?

After-thought: After reading the first two great answer plus the article linked, I realized that yes, behavior might have changed, but it's more likely that I have misunderstood the clipboards for years, and it's more about changes in my work-flow (i.e. heavy use of vim, ssh and urxvt and keyboard-oriented control) that caused recent increase in my stumbling. (I feel relieved that it's not another instance of terrible trend in FOSS when developers are arbitrarily "improving" fundamentals of desktop tools.)

So while I was expecting a "switch to turn it back" to behave how it was how I understood it, namely retaining separate "Ctrl+X/C/V" and "MMB", I'll be looking into solutions involving The Grand Unification. Maybe I'll need to tune my work-flow, but at least I'll be understanding my tools.

share|improve this question
add comment

2 Answers

What your experiencing is due to the fact that in the X Windows environment there are multiple clipboards (3 actually):

  • CLIPBOARD
  • PRIMARY
  • SECONDARY

Here's a good background primer if you're interested, titled: Subtleties of the X Clipboard.

This U&L Q&A titled: How can I use just one unified clipboard? discusses how to unify the clipboards and also some of the 3rd party clipboard managers that can be used, i.e. (xclip, parcelite, etc.).

You should check in gconf-editor under apps → gnome-terminal → keybindings to make sure that paste is set correctly.

   ss of gconf-editor

share|improve this answer
add comment

Unix have two main "clipboards", the PRIMARY and the CLIPBOARD.More info in wikipedia the PRIMARY is the "select and paste with the mouse middle click" X11 style and the CLIPBOARD is the traditional copy&paste. Every time you select a text, the PRIMARY gets that text and it its lost when the text stop being selected. This is useful, but require training, as other systems don't require the selection to be active, people are used to click around before pasting and any click will lose the selection.

So what you want is the CLIPBOARD copy&paste that stays until a new CLIPBOARD is loaded. The main problem is that when you are going to do the paste, you may get the PRIMARY or the CLIPBOARD content, depending of the app and the way you use it.

fear not, there are many apps that solve this confusion, by synchronizing both PRIMARY and CLIPBOARD and even having a history, a huge help to manage copy&pastes.

There are many tools, like the Klipper and Glipper for kde and gnome, but many others for other WM and most of then are WM independent. I use parcellite, as its simple and works fine. Check here for many alternatives.

You can also search the net for "clipboard manager" for more info and apps

share|improve this answer
add comment

Your Answer

 
discard

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.