News for hackers. Stuff that matters.
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.

Seems like overkill.

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 parenthesis on Tuesday November 30, 2010 @03:46PM (#1955525)
While on this general subject, here's what I use to do the equivalent X copy and paste thing on Linux:

  # 'pbcopy'
  xsel -b -i

  # 'pbpaste'
  xsel -b -o
Re:Remote pbcopy by bockris on Tuesday November 30, 2010 @01:43PM (#1955103)
For windows users this project http://unxutils.sourceforge.net/

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).

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.

http://web.archive.org/web/*/http://unxutils.sourceforge.net...

http://web.archive.org/web/*/http://unxutils.sourceforge.net...

http://unxutils.sourceforge.net/md5sum

Re:Remote pbcopy by bockris on Tuesday November 30, 2010 @04:34PM (#1955667)
That stinks. I didn't verify the download links, sorry.

I have mine in a 'bin' folder that gets copied to each new PC in turn.

Re:Remote pbcopy by pielud on Tuesday November 30, 2010 @02:02PM (#1955171)
Can't this be achieved just using ssh instead of setting up a process that listens to the network?

from remote machine:

  ssh me@macbook pbcopy < foo.txt
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.

S

Re:Remote pbcopy by greyboy on Tuesday November 30, 2010 @02:54PM (#1955348)
This is what I use, though not as fancy.

mac$ ssh user@remote "some command" | pbcopy