Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am having issues with the Gnome(/Linux/Debian+Ubuntu) clipboard when connected remotely; it's default behavior appears to be to automatically add text to a clipboard buffer when that text is selected. This is not usually a problem, until I need to log into one of these systems remotely (w/ GUI), and attempt to use a shared clipboard. If I 'copy' text on the local machine (destined to replace some text on the remote machine), that copy buffer is overwritten as soon as I select the text on the remote machine to be replaced.

Is there some way around this? It sort of drives me nuts.

Thanks!

UPDATE: This is really an NX server issue; X11 supports multiple clipboards ("selections": clipboard, primary. secondary; see this excellent article) that behave differently, and it appears that my problem is related to how NX server translates this over to the host machine.

share|improve this question

1 Answer 1

X11's clipboard system is implemented using three types of "selections": 'primary', 'secondary', and 'clipboard'. 'Clipboard' is used for "Copy/Paste" menus and ctrl+c/v, and primary is used for mouse selection and middle mouse button paste; 'secondary' is a little used area, as a backup for 'primary'.

The freedesktop.org clipboard specification explains the following about the PRIMARY selection:

1.It's inconsistent with Mac/Windows;
2.It's confusingly. Selecting anything overwrites the clipboard;

So, it appears that because the Primary selection overwrites the Clipboard selection, you can never effectively overwrite a block of text on the remote machine with a block of text selected from the host machine (once the second selection is made (into the primary), it overwrites the first selection (in the clipboard)).

The answer to the question is probably "No", unless the linked specs are outdated (they are from 2001), or there is some override to this behavior that I couldn't find.

share|improve this answer
1  
At least on CentOS (and I believe most other graphic Linux I have worked with), setting Primary does not overwrite Clipboard. In other words, I can select some text, copy, select some other text (overwriting Primary), and paste the first text from Clipboard. The issue that you talk about (that I also have) is that NX seems to be taking the value of the local clipboard, putting it in Primary, and making Clipboard somehow point to it as well. When you select something on the remote machine, Primary is set to the new value and Clipboard is cleared. –  Konstantin Naryshkin Dec 8 '11 at 18:16

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.