clipboard-watcher icon indicating copy to clipboard operation
clipboard-watcher copied to clipboard

Differentiate between 'App' and 'User' initiated clipboard actions possible?

Open SjoerdV opened this issue 3 years ago • 3 comments

Really interested in this concept, thanks for calling some attention to it.

I am wondering though, would it be possible to discern between user initiated paste actions through keyboard commands/mouse actions and the likes AND apps trying to get clipboard data on their own without user initiative?

If so it might be possible to allow the first but block the second, system-wide. Right?

Maybe even blocking access to the clipboard api by default for everything and then opening it for a fraction of a second when 'user input device' commands are detected and closing it up again when done.

SjoerdV avatar May 28 '22 12:05 SjoerdV

It would be a great feature to have indeed. However I'm not sure if it is possible (at least with the available X API and without the "access watcher" app becoming too intrusive), it will require a bit more research.

I'm currently exploring another direction, which is allowing the user to decide which apps can access the clipboard and those that need to be blocked. While simpler, it definitely creates more noise than what you are suggesting.

dethos avatar May 30 '22 15:05 dethos

Yeah well, having both a whitelist and a blacklist to maintain seems like a lot of work.

I also saw some ideas about a 'clipboard sandbox' for each app so you can freely copy stuff within one App, but having multiple clipboards doesn't seem a very good approach and escaping these clipboard sandboxes should be possible defeating the entire purpose.

Something equivalent for browsers is already available btw: https://rawsec.ml/en/disable-clipboard-events/: why can't we have that in the Linux kernel ;-)

Off topic:

Another related issue is that all running/active apps can always record every keystroke (or other user input) at all times. I would like to see only the current 'foreground' app a user has focus on (+ signed system executables/daemons like the global hotkeys app of course) have access to that...

The amount of security/privacy problems in this cloud/appified world are catching up to old school OS paradigms like a Linux kernel. It sure looks like a can of worms to me.

Anyway, thanks for your consideration! If I triggered you to do a little brainstorming, go right ahead.

SjoerdV avatar May 30 '22 20:05 SjoerdV

Something equivalent for browsers is already available btw: https://rawsec.ml/en/disable-clipboard-events/: why can't we have that in the Linux kernel ;-)

https://blog.raw.pm/en/disable-clipboard-events/, old domain is dead

noraj avatar Jan 11 '23 22:01 noraj