Remote pbcopy
seancoates.com
seancoates.com
Seems like overkill.
Then I did this one using Dropbox, but it only works if you have Dropbox installed on both machines:
alias dbcopy="cat > ~/Dropbox/.dbpasteboard"
alias dbpaste="cat ~/Dropbox/.dbpasteboard"
I think there's probably a better solution than all of these. # 'pbcopy'
xsel -b -i
# 'pbpaste'
xsel -b -ohas 'pclip' and 'gclip' which do the same thing as 'pbcopy' and 'pbpaste'.
I have been using this technique for years (without the remote stuff described in the article).
There are copies in the Wayback Machine, and the original site's front page has a link to MD5 hash values in case you want to (more or less) verify the files acquired from Wayback.
http://web.archive.org/web/*/http://unxutils.sourceforge.net...
http://web.archive.org/web/*/http://unxutils.sourceforge.net...
I have mine in a 'bin' folder that gets copied to each new PC in turn.
from remote machine:
ssh me@macbook pbcopy < foo.txtFor me, #1, #2, and #3 are false. #4 is unknown. A VPN would make 1,2,3 easier, though.
S
mac$ ssh user@remote "some command" | pbcopy