How to Write to Clipboard - file method

is there a file designation or method of writing to the clipboard?

I have an editor that will write a block of text to a file, but does not work so well at writing to the clipboard. I want to paste text into other applications/editors.

I thought if there was a filename or something that could be written to that represents the clipboard, I would be able to write a block of text to the clipboard as you would append or overwrite a file. The editor is jstar (joe) editor. And I am running Ubuntu-MATE 20.04 on a Raspberry Pi 4B.


Have a look at clipboard-cli. You can then run

call execute_command_line('echo "My sample text." | clipboard')

from Fortran. There are also xclip and xsel which work essentially the same, but do not run on bare MS Windows.

1 Like