Search notes:

xclip

xclip is the command line interface to clipboards (or selections?)

Fill clipboard

Fill clipboard with foo bar baz:
echo "foo bar baz" | xclip
Apparently, after filling the clipboard, the content can be pasted with the middle mouse click, not with ctrl-v, in some applications.

Print content

Print content of clipboard (-o stands for out):
xclip -o

Copy the content of a file with an image to the clipboard

xclip -i -selection clipboard -t image/png ~/images/foo.png

Getting the content of the clipboard with Python

>>> print(subprocess.check_output('xclip -o', shell=True).decode('utf8'))

See also

Perl module Clipboard
/dev/clipboard
The shell script pc copies the value of the current working directory into the clipboard.
wsl-screenshot-to-clipboard is used in a Windows Subsystem for Linux (WSL) environment to copy a screenshot made with SnippingTool.exe into the clipboard using xclip.
clip.exe on Windows.

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/Linux/X/...', 1758207052, '216.73.216.150', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/Linux/X/clipboard/xclip(71): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78