

b, -clipboard Operate on the CLIPBOARD selection s, -secondary Operate on the SECONDARY selection p, -primary Operate on the PRIMARY selection (default) The application owning it delete its contents d, -delete Request that the selection be cleared and that o, -output Write the selection to standard output i, -input Read standard input into the selection f, -follow Append to selection as standard input grows a, -append Append standard input to the selection Output before being replaced by the contents of standard input. If both input and output is required then the previous selection is The program behaves only in the requested mode. If any input or output options are given then (tty), and the selection is set from standard input if standard input The current selection is output if standard output is not a terminal Standard input and standard output are terminals (ttys). quiet run in foreground, show what's happeningīy default the current selection is output and not modified if both silent errors only, run in background (default) noutf8 don't treat text as utf-8, use old unicode

selection selection to access ("primary", "secondary", "clipboard" or "buffer-cut") d, -display X display to connect to (eg localhost:0")

l, -loops number of selection requests to wait for before exiting o, -out prints the selection to standard out (generally for i, -in read text into X selection from standard input or files Emacs can work with the secondary selection too, but that's rare, and nobody really knows what to do with cut buffers.Īccess an X server selection for reading or writing. Note that X11 traditionally has multiple selections, and most programs have some understanding of both the clipboard and primary selection (which are not the same).

There are various tools to access X11 selections, including xclip and XSel. But I'll add the details later if I see any interest Server (inside SSH session) cat some_useful_content.txt | nc localhost 2000Īctually even if you're in the middle of an ssh session there's a way to start a tunnel but i don’t want to scare people away from what really isn’t as bad as it looks. Note: if you don't have pbcopy then just tee it to a file. (hint: make this a keybinding so you don't have to type it) Client (another tab) nc -l 2000 | pbcopy Client (ssh session startup) ssh -R 2000:localhost:2000 I've started using this and it's nowhere near as intimidating as it looks so give it a try. Here's another way to do it, though you'll need to modify how you ssh into your computer.
