Re:Remote pbcopy
by ary on Tuesday November 30, 2010 @03:57PM
(#1955556)
As someone else pointed out in a sub-comment, ssh user@host 'command' | pbcopy; seems a lot simpler. No open ports, no firewall config... no setup at all. It doesn't give you the access to the pasteboard in your current session, but Command+C has you covered.
Re:Remote pbcopy
by tlrobinson on Tuesday November 30, 2010 @03:09PM
(#1955393)
I did something similar for the "open" command, "ropen": https://github.com/tlrobinson/ropen You can open both files and directories. It uses sshfs with simple PHP script to coordinate. I used it for a couple weeks then forgot about it.
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.
Re:Remote pbcopy
by pasbesoin on Tuesday November 30, 2010 @03:12PM
(#1955398)
Unexpectedly (I've used them before), I found the file links returning 403.
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.
Re:Remote pbcopy
by scoates on Tuesday November 30, 2010 @02:09PM
(#1955200)
If:
1) macbook has ssh turned on
2) macbook's IP is routable (or forwarded via NAT),
3) server is able to log in to macbook (has private key, or you supply password, etc)
4) the pastboarde is available without a GUI (not sure that sshing to a macbook and issuing pbcopy will adjust the pasteboard of the user at the terminal)
For me, #1, #2, and #3 are false. #4 is unknown.
A VPN would make 1,2,3 easier, though.
Seems like overkill.
Then I did this one using Dropbox, but it only works if you have Dropbox installed on both machines:
I think there's probably a better solution than all of these.has '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...
http://unxutils.sourceforge.net/md5sum
I have mine in a 'bin' folder that gets copied to each new PC in turn.
from remote machine:
For 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