local fake_clipboard=/tmp/clipboard-data.txt
if is-ssh && is-port-in-use $clipper_port; then
# Pipe to the clipper instance and the fake clipboard.
tee >(nc localhost $clipper_port) "$fake_clipboard"
This is not a secure use of /tmp; and in general /tmp is not suitable for such inter-process communication.Please create the fake clipboard file somewhere in the user's home directory.