Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option or separate shortcut to allow multiple use of clipboard data #6640

Open
sjvudp opened this issue May 26, 2021 · 6 comments · May be fixed by QubesOS/qubes-gui-daemon#159
Open

Option or separate shortcut to allow multiple use of clipboard data #6640

sjvudp opened this issue May 26, 2021 · 6 comments · May be fixed by QubesOS/qubes-gui-daemon#159
Assignees
Labels
C: core C: gui-virtualization P: minor Priority: minor. The lowest priority, below "default." T: enhancement Type: enhancement. A new feature that does not yet exist or improvement of existing functionality.

Comments

@sjvudp
Copy link

sjvudp commented May 26, 2021

The problem you're addressing (if any)

Currently the data in the clipboard can be pasted only once to any VM; the data is cleared after that.

Describe the solution you'd like

In some cases it would be useful to paste the clipboard data multiple times.

Where is the value to a user, and who might that user be?

The feature may save time for the user wanting to paste the clipboard into multiple VMs (e.g. to execute a command on different terminals).
I see that the feature may affect privacy of clipboard data to some extent.
Maybe the new feature should be configurable, or there should be a new key combination like "paste&keep" to paste the clipboard into the local one, but keep the data.
Maybe there could also be a key combination to "forget" the clipboard contents (if there is a new default to keep the contents).

Describe alternatives you've considered

Pasting to a VM and then immediately re-copying might do the trick.

Additional context

Relevant documentation you've consulted

Related, non-duplicate issues

@sjvudp sjvudp added P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. T: enhancement Type: enhancement. A new feature that does not yet exist or improvement of existing functionality. labels May 26, 2021
@andrewdavidwong
Copy link
Member

Wiping the inter-VM clipboard after pasting into a VM is an intentional security feature.

Maybe the new feature should be configurable, or there should be a new key combination like "paste&keep" to paste the clipboard into the local one, but keep the data.

I am skeptical, but maybe if someone wants to submit a PR for it (should discuss here first, though).

@andrewdavidwong andrewdavidwong added C: core help wanted This issue will probably not get done in a timely fashion without help from community contributors. P: minor Priority: minor. The lowest priority, below "default." and removed P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. labels May 26, 2021
@andrewdavidwong andrewdavidwong added this to the TBD milestone May 26, 2021
@andrewdavidwong andrewdavidwong changed the title Allow multiple use of clipboard data Option or separate shortcut to allow multiple use of clipboard data May 26, 2021
@andrewdavidwong andrewdavidwong removed this from the Release TBD milestone Aug 13, 2023
@alimirjamali
Copy link

I am skeptical, but maybe if someone wants to submit a PR for it (should discuss here first, though).

Definitely doable. Rather easy. Could be kept as CLI only (special feature) to avoid confusing novice users. Something like gui-secure-multipaste-sequence. And not adding it to Global Config GUI.

GUI Daemon could only update metadata and modification time of clipboard data to trigger systray notification.

@alimirjamali
Copy link

alimirjamali commented Nov 15, 2024

Since PR for #7730 is merged now, I can work on this. Three PRs will follow shortly. One for GUI Daemon and validator update for qvm-start-daemon. One for systray widget notification. For the documentation, we could mention it in guid.conf

@alimirjamali
Copy link

alimirjamali commented Nov 15, 2024

@marmarta I have written the GUI Daemon patch for multiple use of global clipboard. It pastes to the destination clipboard, updates the DATA file modification time and writes the relevant metadata (paste=1, successful=1, cleared=0). I tested it and it works. The only remaining part is the systray widget notification.

I do not know the event to use with pyinotify to react to change to file modification time. IN_ATTRIB does not work. I also tried to open file in append mode without actually appending anything to it and closing it. It also does not work. Is there a suitable pyinotify event?

p.s.: Got it. it is IN_CLOSE_NOWRITE.

@sjvudp
Copy link
Author

sjvudp commented Nov 16, 2024

In some cases it would be useful to paste the clipboard data multiple times.

Well, the default (forget after pasting) could be kept, and an additional key sequence for "paste, but preserve" could be added.

@alimirjamali
Copy link

In some cases it would be useful to paste the clipboard data multiple times.

Well, the default (forget after pasting) could be kept, and an additional key sequence for "paste, but preserve" could be added.

The patch is exactly like that. You could define the additional key with gui-default-secure-multipaste-sequence for dom0 (or GUIVM). For example Ctrl+Shift+m.

@andrewdavidwong andrewdavidwong added C: gui-virtualization and removed help wanted This issue will probably not get done in a timely fashion without help from community contributors. labels Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: core C: gui-virtualization P: minor Priority: minor. The lowest priority, below "default." T: enhancement Type: enhancement. A new feature that does not yet exist or improvement of existing functionality.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants