Closed ds451 closed 9 months ago
What do you mean set process primary selection to "false" in the definitions? You need to modify the settings through the extension (it's the save selected text option) for stuff to work correctly.
What do you mean set process primary selection to "false" in the definitions? You need to modify the settings through the extension (it's the save selected text option) for stuff to work correctly.
That's what I did, sorry if it was not clear. "Save selected text" is set to false in the extension's definitions.
It correspond to this, right?
Yup, correct. Huh, maybe restart the extension? I just double checked and it works on my end.
Thank you for taking the time to look into this. I restarted several times. Then removed the extension, reinstalled and rebooted (twice), but the odd behavior is still there. No matter how the definitions are set, all text I select is saved to history.
And I noticed this, if I select the text by moving the cursor with the arrow keys (as opposed to mouse or touchpad) every single step is copied to the clipboard, see picture below (not sure whether this is expected behavior).
Also, if I select text with the mouse or trackpad and adjust the length of the selection (while still keeping selected), every "movement" is copied to the clipboard:
I feel like something else is broken here. Above this line: https://github.com/SUPERCILEX/gnome-clipboard-history/blob/e46f78e7e82b8eec6d591e2a8ace2e1e9077c4f6/extension.js#L834
can you add this console log?
console.log(Me.uuid, PROCESS_PRIMARY_SELECTION, text);
BTW you can find the extension code in ~/.local/share/gnome-shell/extensions/clipboard-history@alexsaveau.dev/extension.js
.
Then restart gnome with Alt+F2, type r, then enter.
Now watch the logs: sudo journalctl -f /usr/bin/gnome-shell
.
You should see entries like this:
Feb 15 11:58:27 pop-os gnome-shell[3452]: clipboard-history@alexsaveau.dev false sudo journalctl -f /usr/bin/gnome-shell
I did as you suggested, and this is what I see (I selected a few words before, including one with the arrow keys):
ds451@Banana3000:~$ sudo journalctl -f /usr/bin/gnome-shell fev 15 21:41:45 Banana3000 gnome-shell[1459]: clipboard-history@alexsaveau.dev false constituiam fev 15 21:41:47 Banana3000 gnome-shell[1459]: clipboard-history@alexsaveau.dev false pessoas fev 15 21:41:50 Banana3000 gnome-shell[1459]: clipboard-history@alexsaveau.dev false p fev 15 21:41:51 Banana3000 gnome-shell[1459]: clipboard-history@alexsaveau.dev false pa fev 15 21:41:51 Banana3000 gnome-shell[1459]: clipboard-history@alexsaveau.dev false pas fev 15 21:41:51 Banana3000 gnome-shell[1459]: clipboard-history@alexsaveau.dev false pass fev 15 21:41:51 Banana3000 gnome-shell[1459]: clipboard-history@alexsaveau.dev false passo fev 15 21:41:51 Banana3000 gnome-shell[1459]: clipboard-history@alexsaveau.dev false passou fev 15 21:41:54 Banana3000 gnome-shell[1459]: clipboard-history@alexsaveau.dev false maior fev 15 21:42:05 Banana3000 gnome-shell[1459]: clipboard-history@alexsaveau.dev false sudo journalctl -f /usr/bin/gnome-shell
all these are in the clipboard history also
By the way, not sure if this is relevant, but as I said I'm on Ubuntu 22.04 which uses Wayland, not Xorg (unlike Pop Os. I wish I could switch to Pop Os btw, but my laptop's camera is not supported).
Thanks for the debugging info! Unfortunately, I'm pretty sure this isn't the extension's fault: if you look at the code, you'll see that I'm asking for clipboard data only (the method below asks for primary selections). This means something is giving us primary selections as if they were clipboard data.
Not sure where you can report this bug either.
Hi, today's OS updates fixed this issue and now all is back to the normal behavior! Thank you again for this formidable extension!
Weird, thanks for letting me know.
Describe the bug
Selected text is always automatically copied to the clipboard, even when the correspondent definition is set to false.
Ubuntu 22.04 - Gnome 42.9
How To Reproduce
1) set process primary selection to "false" in the definitions; 2) select text anywhere; 3) selected text is automatically copied to clipboard history, which is not the expected behavior.
Versions
GNOME Shell 42.9 GCH org.gnome.shell.extensions.clipboard-history cache-only-favorites false org.gnome.shell.extensions.clipboard-history cache-size 25 org.gnome.shell.extensions.clipboard-history clear-history @as [] org.gnome.shell.extensions.clipboard-history confirm-clear true org.gnome.shell.extensions.clipboard-history disable-down-arrow true org.gnome.shell.extensions.clipboard-history display-mode 3 org.gnome.shell.extensions.clipboard-history enable-keybindings true org.gnome.shell.extensions.clipboard-history history-size 900 org.gnome.shell.extensions.clipboard-history move-item-first true org.gnome.shell.extensions.clipboard-history next-entry @as [] org.gnome.shell.extensions.clipboard-history notify-on-copy false org.gnome.shell.extensions.clipboard-history paste-on-selection true org.gnome.shell.extensions.clipboard-history prev-entry @as [] org.gnome.shell.extensions.clipboard-history private-mode false org.gnome.shell.extensions.clipboard-history process-primary-selection false org.gnome.shell.extensions.clipboard-history strip-text false org.gnome.shell.extensions.clipboard-history toggle-menu ['V']
org.gnome.shell.extensions.clipboard-history toggle-private-mode ['P']
org.gnome.shell.extensions.clipboard-history topbar-preview-size 1
org.gnome.shell.extensions.clipboard-history window-width-percentage 33
(I'm on Ubuntu 22.04.3)