Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

If not why not? It seems as though reading, writing, and appending to it would be far more flexible provided multi instance and multi-user issues are accounted for.

like image 753
ojblass Avatar asked Dec 17 '22 07:12

ojblass


2 Answers

AFAIK no.

But you can use xclip if you want command-line access to the X11 Clipboard

like image 86
jitter Avatar answered Dec 28 '22 07:12

jitter


No..

The operating system is not for GUI/Application layer semantics it only provides the raw abstraction to present a consistent, pretty system to user-space applications. If you want to do something like this, I would advise you write a system daemon that applications can use as a copy store and access through system IPC such as DBus.

Standards in the freedesktop.org standards may define standards for GUI interoperability and advise they communicate through something like DBus.

Rather than a kernel space system, you may want to manage copy and paste semantics above OS services such as IPC and keep the policy in user-land but through operating system mechanics.

Whilst a device driver presentation kind-of makes sense, IMHO it belongs in user-space as some kind of mini-database with source/target data and meta-data relating to encoding and so on ... none of which are strictly kernel concerns.

Please don't write a copy/paste device driver :)

edit toned down the bolding ..

like image 38
Aiden Bell Avatar answered Dec 28 '22 07:12

Aiden Bell