Command for Clearing Clipboard After Pasting

Is their any linux commands or for that matter dom0 to clean/clear clipboard when done copy&paste?

Maybe run them in terminal once i am done doing everything i need to do at the end of a session???

The inter-qube clipboard is cleared after you paste. within a specific qube you can always just CTRL-C some random text to clear.

further reading:

https://www.qubes-os.org/doc/how-to-copy-and-paste-text/

Well i find that hard to believe because when “copy” from KeePassXC and paste “where ever”, It will paste again what was first copied and not the new password or phase i just copied. So i then have to delete what KeePassXC just pasted and then paste what i just copied by"right click and paste from mouse". So some where this is still being retained in KeePassXC or Dom0 “the first copy of whatever i copied” and not pasting what i just copied. It happens a lot and is troubling.
So something or KeePassXC is not clearing or cleaning the clipboard.

You select the entry you want in KeypassXC

  1. Ctrl+C … copies into ‘vault’ clipboard
  2. Ctrl+Shift+C … copy from ‘vault’ clipboard to Qubes OS clipboard
  3. change focus to target qube
  4. Ctrl+Shift+V … paste into ‘target’ clipboard & wipe Qubes OS clipboard
  5. Ctrl+V … paste into target app (copy remains in ‘target’ clipboard)

It will paste again what was first copied and not the new password or
phase i just copied.

Then you skipped step 4 and re-pasted what was still in the ‘target’
clipboard.

and then paste what i just copied by"right click and paste from
mouse".

I don’t see how that could be the case without step 4, except if you
perform the right click and paste in KeepassX and not the target qube.

Ctrl+V and “right click and paste from mouse” both apply what’s in the
clipboard of the currently focused qube.

Note that the dom0 clipboard was never involved and is distinct from the
Qubes OS clipboard.

3 Likes

Agree witih @Sven - something does not seem right here

can you outline your steps please @B_ryr, like “i click copy in Qube A… then i …”

Yes i will later this week. I have a lot going on right now but will post

Ok guys, this is mostly user error. My keystrokes are off…

You see i will highlight (word,password) in KeePassXC and then follow what Sven has said but sometimes my keystroke is off or i hit the next key and it removes what i have highlighted to copy… i follow exactly what Sven is saying and it works.

How do i “delete” the targets clipboard after i paste? So that it doesn’t repaste the previous (word,password)…

  1. Ctrl+V … paste into target app (copy remains in ‘target’ clipboard)

If you are talking about the clipboard of the target VM, then it’s technically an OS-specific thing. The clipboard inside a VM is just a standard clipboard (isolated from the rest of the system). To clear it you can copy something else into it.

(adjusted title for clarity)