Passwords pasted to clipboard?  [Solved]

For questions regarding system and application security
Message
Author
User avatar
fehlix
Developer
Posts: 12766
Joined: Wed Apr 11, 2018 5:09 pm

Re: Passwords pasted to clipboard?

#21 Post by fehlix »

MXRobo wrote: Fri Feb 16, 2024 10:34 pm Can this be done in MX-21.3 Xfce?
I'm having difficulty doing this as I cannot find an insert - paste selection, but I also do not have a middle mouse button on my touchpad or my mouse.
Maybe bind this to a kbd shortcut

Code: Select all

xdotool click 2
which gives a mouse button middle click to "paste" the the primary "selection" buffer.

Charlie Brown

Re: Passwords pasted to clipboard?

#22 Post by Charlie Brown »

MXRobo wrote: Sat Feb 17, 2024 12:05 am... Maybe I have synclient/synaptic running instead of libinput. ...
Nope , that's not the case, cause (MX-23.2) I had changed to Synclient here long time ago , it works and libinput on live session (with the official MX-23 iso) , that works, too , so , pressing both buttons together imitates the middle mouse "ootb" with both drivers (at least here) ...

(Same on the other "very old" laptop with MX-19)

P.S. Check the "Tap touchpad to click" in mouse and tp settings, Touchpad sub-tab.

Kulmbacher
Posts: 489
Joined: Fri Apr 27, 2018 2:47 pm

Re: Passwords pasted to clipboard?

#23 Post by Kulmbacher »

Charlie Brown wrote: Thu Feb 01, 2024 8:32 pm ...you can clear the clipboard whenever you like/remember or as soon as you complete the job. Install the tiny xsel package...
Thank you CB, wonderful tiny tool :-)

Charlie Brown

Re: Passwords pasted to clipboard?

#24 Post by Charlie Brown »

@Kulmbacher :number1:

LinnitXa
Posts: 80
Joined: Tue Mar 24, 2020 1:07 pm

Re: Passwords pasted to clipboard?  [Solved]

#25 Post by LinnitXa »

Thanks for all the replies, still to digest some of them!

As my main concern was about passwords, if I was going to use a PW manager that pasted to clipboard, I think I have solved it by installing keepassxc with the browser integration.

https://keepassxc.org/docs/KeePassXC_Us ... ntegration

They say there it's secure.

LinnitXa
Posts: 80
Joined: Tue Mar 24, 2020 1:07 pm

Re: Passwords pasted to clipboard?

#26 Post by LinnitXa »

fehlix wrote: Fri Feb 16, 2024 1:41 pm
LinnitXa wrote: Thu Feb 01, 2024 4:25 pm MX23, Desktop pc

If it's true that apps have access to the clipboard, is it not unsafe to use a password manager which pastes the passwords to the clipboard first?
The "Clipboard Manger" Clipman in Xcfe does handle both "buffers" the clipboard copy/paste buffer and the "selection" buffer.
The later is populated every time you select with mouse (or keyboard) text.
When Clipman is running it copies (and remembers) anything what is copied to the clipboard.
Trying to clean/clear the clipboard buffer won't help, b/c it's already copied to Clipman.

The default setting in MX-23.2 Xfce is to ignore the "Mouse" selection buffer and put those not into the history.
So in order to not get sensible text like password copied to Clipman and remembered,
would be not to use copy/paste but highlight/select and insert-"paste" from "selection" buffer using middle mouse.
E.g. in KeePassXC one can click view password and with the shown password select e.g with Ctrl+a or highlight manually.
The next "selection" would replace the selection buffer.
Thanks, this looks interesting, I'll take a closer look later.

MXRobo
Posts: 1835
Joined: Thu Nov 14, 2019 12:09 pm

Re: Passwords pasted to clipboard?

#27 Post by MXRobo »

LinnitXa wrote: Fri Feb 23, 2024 8:03 am Thanks for all the replies, still to digest some of them!

As my main concern was about passwords, if I was going to use a PW manager that pasted to clipboard, I think I have solved it by installing keepassxc with the browser integration.

https://keepassxc.org/docs/KeePassXC_Us ... ntegration

They say there it's secure.
I've played and used some of these post suggestions too, KeePassXC has an AutoType that will also do this, I recently used it about twice, it's nice.
IIRC and understand, the default is to use two fields, e.g. username filled, delay, password filled, which works for most sited, and it can be customized for e.g.
name, address line 1, address line 2, city, state, zip etc.
You enable it in IIRC Tools->Settings, add a keyboard shortcut, then press the shortcut when on your webpage, it then opens a scrollable window to select your KeePassXC entry, it then autofills - nice.

Also: used something like {Time: dd_mm_yyyy_hr-mm-sec) see bottom of page
https://libreddit.oxymagnesium.com/r/Ke ... e_when_it/
https://doc.qt.io/qt-5/qtime.html#toString

Good Luck!

MXRobo
Posts: 1835
Joined: Thu Nov 14, 2019 12:09 pm

Re: Passwords pasted to clipboard?

#28 Post by MXRobo »

This is in reply to post #'s 21 & 22 from fehlix and CB:

Tap to click was enabled, it'd have to be enabled otherwise the touchpad won't work.

I realized for the first time, that Clipman copies text to the history when simply highlighting text.

xinput indicates: 0: device does not have a physical middle button

==================================================
Probably not relevant, just included as I was trying to figure things out - still am.
ASUS Precision TouchPad Driver Version V16.0.0.11 – 2022/02/08
https://www.asus.com/us/laptops/for-hom ... 5-F512-AMD
But I don't know if linux needs them or if I can install as no windows on this laptop.
==============================================================
I also tried: synclient EmulateMidButtonTime=500 to no avail.
Since most synaptics touchpad models don't have a button that corresponds to the middle button on a mouse, the driver can emulate middle mouse button events. If you press both the left and right mouse buttons at almost the same time (no more than EmulateMidButtonTime milliseconds apart) the driver generates a middle mouse button event.

Code: Select all

Clipman V 1.6.2
$ xfconf-query -c xfce4-panel -lv | grep /plugins/clipman
/plugins/clipman/settings/add-primary-clipboard             false
/plugins/clipman/settings/enable-actions                    false
/plugins/clipman/settings/history-ignore-primary-clipboard  false
/plugins/clipman/tweaks/never-confirm-history-clear         false
/plugins/clipman/tweaks/paste-on-activate                   0
/plugins/clipman/tweaks/popup-at-pointer                    false
=============================================================
I tried fehlix's "xdotool click 2" but I maybe incorrectly entered it as a Keyboard Shortcut, in fact I tried several Keyboard Shortcuts for it, ("Super+2" being one of them) and now the #2 key (the horizontal ones, not keypad) does not work unless I press "Super+2".
I removed "Super+2" for "xdotool click 2" from Keyboard→ Application Shortcuts, but this still persists.
[Later prepost edit – it's fine now after rebooting.] And I will play with this some more, been busy.

Did fehlix mean to enter it as a Keyboard Shortcut or do some "binding" of which I have no experience.?
And sometimes it pastes whatever is/was highlighted and paste it in different locations, sometimes after the highlighted text, sometimes a few lines below the highlighted text.
Also, I get different symbols next to recently highlighted or copied text, i.e.; arrow right → , lock symbol, and clipboard symbol.

Again - [Later prepost edit – it's fine now after rebooting.] And I will play with this some more, been busy.

I think I could have caused problems using the Super key and "xdotool click 2", anyway it was copying and pasting very oddly, at least it appeared so to me as to have no pattern - probably me and/or the Super key - will retry later.

Ancillary curiosity questions:
Just curious - would xdotool work with devilspie 2 when manipulating windows?
Just curious - would xdotool be the thing to use if one wanted to created "spotify-client" keyboard shortcuts, or would another keyboard layout be better.
I have NO experience with keyboard layout either.

Thanks all - love this distro!

Post Reply

Return to “Security”