TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Remote pbcopy

35 pointsby tswicegoodover 14 years ago

5 comments

aryover 14 years ago
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.<p>Seems like overkill.
tlrobinsonover 14 years ago
I did something similar for the "open" command, "ropen": <a href="https://github.com/tlrobinson/ropen" rel="nofollow">https://github.com/tlrobinson/ropen</a> 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.<p>Then I did this one using Dropbox, but it only works if you have Dropbox installed on both machines:<p><pre><code> alias dbcopy="cat &#62; ~/Dropbox/.dbpasteboard" alias dbpaste="cat ~/Dropbox/.dbpasteboard" </code></pre> I think there's probably a better solution than all of these.
parenthesisover 14 years ago
While on this general subject, here's what I use to do the equivalent X copy and paste thing on Linux:<p><pre><code> # 'pbcopy' xsel -b -i # 'pbpaste' xsel -b -o</code></pre>
bockrisover 14 years ago
For windows users this project <a href="http://unxutils.sourceforge.net/" rel="nofollow">http://unxutils.sourceforge.net/</a><p>has 'pclip' and 'gclip' which do the same thing as 'pbcopy' and 'pbpaste'.<p>I have been using this technique for years (without the remote stuff described in the article).
评论 #1955398 未加载
pieludover 14 years ago
Can't this be achieved just using ssh instead of setting up a process that listens to the network?<p>from remote machine:<p><pre><code> ssh me@macbook pbcopy &#60; foo.txt</code></pre>
评论 #1955200 未加载