30

I've finally found myself at home in Linux, but there is still one thing that has bothered me since the start, and I have not found a realistic solution:

How do I disable the automatic copying of highlighted text in Linux's desktop environment

My Desktop Environment is XFCE, Window Manager is Openbox and it's all held together by Archlinux, I do however have these issues in other distributions.

Every time I go to replace a section of text I:
Highlight the source then press the usual Ctrl-C
I then select the text I want to replace and since highlighting text automatically copies it to the clipboard, manually reselect from clipman the selection I just copied, and paste it that way. This is very inefficient.
I have resorted, out of desperation to using Windows for heavy editing of Source / Documents.


I would prefer to have copy paste routine identical to that which Windows uses
Select-Ctrl-CSelect-Ctrl-V.

edit
The problem was my fault all along!
I had ignorantly pasted autocutsel -selection PRIMARY -fork & into my .xprofile, causing autocutsel to sync all my selections into the PRIMARY clipboard. For more info

dr_
  • 29,602
  • 3
    Nit: Ctrl-C is not the usual, that's Windows talk. The usual is middle click paste. – terdon Mar 10 '14 at 23:37
  • 2
    There are multiple clipboards. Normally Ctrl+C/Ctrl+V uses a separate clipboard from select/middle click. What app doesn't that work in? – Mikel Mar 10 '14 at 23:42
  • 1
    @Mikel, It's works. My issue is that upon selecting the text to highlight, it becomes copied to the clipboard at the current position, resulting in the text I intend to paste being pushed down (or up) and the text I selected being copied instead. – ppsdevelops Mar 11 '14 at 12:20
  • Yes, understood. That's exactly what happens if you have the "Sync selections" option enabled in Clipman. Try turning it off, or disabling your clipboard manager(s). – Mikel Mar 11 '14 at 14:06
  • I have been having the opposite problem where I want it to copy on select, so enabling "Sync selections" helped me out--thanks!!! – dannyman Oct 19 '17 at 18:14

3 Answers3

12

I can only reproduce this if I enable "Sync Selections" in Clipman.

Make sure "Sync selections" is unchecked and you should be fine.

                          Clipman settings

For more background on the multiple clipboards, see:

Mikel
  • 57,299
  • 15
  • 134
  • 153
  • Thanks but unfortunately this did not work for me. Perhaps it is a clipboard conflict – ppsdevelops Mar 11 '14 at 12:24
  • Was "Sync selections" enabled? What do you mean by "clipboard conflict"? Do you have other clipboard managers running too? Try turning them all off for a minute. – Mikel Mar 11 '14 at 14:10
  • I apologize for such asking such a silly question without realizing that in my .xprofile I had the following line

    autocutsel -selection PRIMARY -fork &

    – ppsdevelops Mar 11 '14 at 14:21
  • Out of curiosity, what were you trying to achieve with that autocutsel command? Is there a tutorial you were following? – Mikel Mar 11 '14 at 14:27
  • I fancied a friends Archlinux install, he provided me with various scripts and programs to check out. I skimmed through them, his explanation of autocutsel was such that it combined the console clipboard then window based clipboard, clearly I do not know what this means, but I assumed it would be a good thing to have. Due to the fact that I couldn't find a man page just copied it and left it be. – ppsdevelops Mar 11 '14 at 14:31
  • Strangely, in Clipman 1.6.2 I had to enable "Sync mouse selections" and "Ignore mouse selections" to ignore the primary selection (With "Sync mouse selections" disabled, it wouldn't ignore them). – Dario Seidl Sep 09 '21 at 16:16
10

I think you might want to turn off "Sync Selections" in the Clipman options.

See the Clipman Documentation, specifically the distinction between the "primary" and "default" clipboards and the general settings section

cjm
  • 27,160
TimP
  • 461
  • I apologize for such asking such a silly question without realizing that in my .xprofile I had the following line

    autocutsel -selection PRIMARY -fork & Removing this solved my problem. Lesson learned: Know what your doing before you run / auto start something

    – ppsdevelops Mar 11 '14 at 14:24
2

First of all that should actually be possible out of the box. However, the traditional *nix way has always been to select and then use the middle mouse button (or both buttons at once if you didn't have a middle one) to click. This is, and I am being objective here, much easier, it only needs two actions: select + click as opposed to select + CtrlC + CtrlV which is three (or 5 if you count keys). I suggest you try getting used to that, it took me a while to when I first switched to Linux 15 years ago but I can't live without it now.

Anyway, as I said, CtrlC + CtrlV should work out of the box. Where exactly does it not work for you? The issue you describe with clipman is probably just confusion because of the multiple clipboards that most Linux systems have.

terdon
  • 242,166
  • 1
    Some of the various places it does not work are; Sublime Text, Eclipse, IntelliJ, Firefox, Libre Writer. I am going to investigate the possibility of my desktop starting another clipboard, along with .xprofile, and autostart – ppsdevelops Mar 11 '14 at 12:24
  • 1
    Upon investigation the issue resulted from me forgetting I had pasted the following line in my .xprofile

    autocutsel -selection PRIMARY -fork &

    – ppsdevelops Mar 11 '14 at 14:26
  • 4
    The down side of this is when you want to copy something and then replace something else. When you select the thing you want to replace, it overwrites the clipboard. – Matthijs Wessels Aug 23 '16 at 13:19