Is the Linux system clipboard represented on the file system somewhere as a device?

If not, why? It seems that reading, writing, and adding to it would be much more flexible if problems with multiple instances and multi-user were taken into account.

+4
source share
3 answers

No..

The operating system is not intended for the semantics of the GUI / Application layer ; it provides only raw abstraction to be a consistent, beautiful system for user space applications. If you want to do something like this, I would advise you to write a system daemon , which applications can use as storage for copies and access through a system IPC, such as DBus.

Freedesktop.org standards standards can define GUI compatibility standards and report them through DBus.

Instead of a kernel space system, you may need to control copy and paste semantics over OS services, such as IPC, and save the policy in the user area, but using the mechanics of the operating system.

While the presentation of the device driver makes sense, IMHO it belongs in the user space as a kind of mini-database with source / target data and metadata related to encoding, etc .... none of which is strictly kernel problems.

Please do not write driver to copy / paste :)

change reduced bold ..

+2
source

AFAIK no.

But you can use xclip if you need command line access to the X11 clipboard

+7
source

There is no "clipboard" at the kernel level - this is a concept related to higher levels, for example X11. Of course, nothing prevents you from writing a device driver, user space file system or anything else to make it visible in these conditions!

+1
source

Source: https://habr.com/ru/post/1286204/


All Articles