Use RealVNC instead
<https://www.realvnc.com/en/connect/download/viewer>
On Linux
vncconfig &
should be running in the VNC session so the clipboard is shared between Linux and macOS.
Basically, RealVNC keeps the clipboard in sync, between the 2 platforms, and you just use the native copy & paste commands on each platform.
The following Copy/Paste behavior is based on '/bin/gnome-terminal'. This may or may not work with xterm. Your milage may vary for other Linux based terminal emulators.
Linux to Mac
- The selected text seems to be transferred to the Mac automagically.
- Control-Shift-C - also copies text to the clipboard
- Command-V pastes the Linux loaded clipboard on the Mac.
Mac to Linux
- Command-C - on the Mac copies selected text to the clipboard
- Control-Shift-V - pastes in a terminal window on Linux