How to copy/paste like in Windows?

Hi,

I have been looking for info about this but couldn’t find any solution.

As far as I understand in Linux one can not disable the automatic copy-on-select. Unfortunately this is a usability problem (at least for me). I am used to replacing text in Windows like this:

  1. Copy the new text
  2. Select the one to be replaced
  3. Press CTRL+V and replace it

But the last step seems impossible in Linux because step 2 replaces what is in clipboard. Not sure why it was designed to work like this, it doesn’t seem useful. Additionally that might be a security problem: Accidentally copying by simple selection and then pasting private info just with a random mouse click.

I wonder if there is a solution to this?

Which desktop environment are you using?

KDE and XFCE

I would copy the new text
Select the new text to be replaced and delete (press delete).
Then do paste (CTRL+Shift+V)

Does that work for you?

Actually, I’ve just tested the behaviour in kwrite and I don’t need to delete, just select as you first described. So, it does work for me.

Sorry, I meant Ctrl+V (Ctrl+Shift+V is for konsole of course).

Here (in kwrite) CTRL+V pastes the last selected text, not the one copied via CTRL+C

I actually haven’t noticed this, everything works as in Windows, but I use LXDE. However, the clipboard is indeed copying for selection, I always select what I’m reading at the moment, and now the clipboard is full of these sentences. xD However, I can right click on the clipboard icon, and click on preferences, and modify the copy-paste behaviour.

I agree that maybe it is just a matter of configuring Klipper (which I’ve never needed to do as it works as expected for me).

@heyjoe: Check that ‘Synchronise contents of the clipboard and the selection’ is not enabled in ‘Configure Klipper…’.

It is unchecked but still pasting shows the last selected text.

Hm. I just saw another thing: The second clipboard icon (the yellow one) (parcelite) in the tray. I quit it and now everything works fine.

Any idea how to disable it so it doesn’t autostart?

Check for autostart files and remove if necessary eg /etc/xdg/autostart/parcellite-startup.desktop

On 2015-08-22 09:56, heyjoe wrote:
> me). I am used to replacing text in Windows like this:
>
>
>
> - Copy the new text
> - Select the one to be replaced
> - Press CTRL+V and replace it

Just for clarification, there are two clipboards in Linux.

One is the traditional clipboard, working with the mouse. It allows
pasting between any application. You can select text from almost
anything, not just edit “boxes”.

The other one is more recent, windows style, ctrl-, ctrl-v. It is
application specific, with some recent support from desktops (klipper,
parcellite… as you saw). One is for KDE, the other for Gnome.


Cheers / Saludos,

Carlos E. R.

(from 13.1 x86_64 “Bottle” (Minas Tirith))

Thanks for explaining. I haven’t tested in XFCE yet (it’s on a far away machine) but in KDE everything seems fine after the change.

On 2015-08-22 16:06, heyjoe wrote:
>
> Thanks for explaining.

Welcome.

I forgot something important. The native or original Linux clipboard
only supports plain text, whereas the application or desktop clipboard
varies a lot. It can paste graphics or formatted texts, but depends a
lot on what those applications provide.


Cheers / Saludos,

Carlos E. R.

(from 13.1 x86_64 “Bottle” (Minas Tirith))

Also, both can be used simultaneously (at least here in KDE) if you cut first: CTRL-C a text, highlight another, then middle-button will paste the highlighted text and CTRL-V will paste the cut one (does not need to be in this order).

Yes, I saw that too. Thanks.

On 2015-08-22 23:36, brunomcl wrote:
>
> Also, both can be used simultaneously (at least here in KDE) if you
> cut first: CTRL-C a text, highlight another, then middle-button will
> paste the highlighted text and CTRL-V will paste the cut one (does not
> need to be in this order).

Yes.
It is annoying some times when you want one and you get the other :wink:


Cheers / Saludos,

Carlos E. R.

(from 13.1 x86_64 “Bottle” (Minas Tirith))