Many of us regularly move from one computer to another for work, play, and hacking; every now and then finding yourself wishing you could copy something on one machine and paste on another without additional steps in between. [Ayan Pahwa] was well acquainted with this frustration, so he created AnywhereDoor, a cross-platform clipboard sharing utility that uses MQTT.
Some cloud-based solutions already exist to do this, but that means sending your private clipboard data to someone else’s server. Not keen on that idea, [Ayan]’s solution makes use of a MQTT broker that can run anywhere on the local network, and lightweight python clients to run on Mac, Windows and Linux. The client checks your clipboard at specified intervals, and publishes new data to a topic on the broker, to which all the clients are subscribed. The data is end-to-end encrypted using Fernet symmetrical key encryption, so the data won’t be readable to anyone else on the network. Currently, AnywhereDoor only supports copying text, but media is planned for a future version.
We like the relative simplicity of the utility, and see it being very handy for hackers bouncing between machines in the lab. Simple software utilities that solve a specific and real problem can are very useful, like a wiring documentation tool, or Kicad to isolation routing patchwork converter.
Supporting anything beside text is a bad idea. The mqtt spec has a maximum message size of approx 260MB. And most public brokers are restricted. Even when using a private broker – sending large messages is considered a bad thing for several reasons. And large means anything bigger then 1 MB. So keep it text-only. Keep in mind that mqtt is supposed to be lightweight.
Ideally you’d probably have the broker send out one-time credentials to a file share or something like that.
couldn’t you chunk it and index them?
You can’t fit anything but text within 1MB?
Kids these days!
This immediately made me think of Synergy. It does more (mouse and keyboard sharing is the primary function) and is for-pay iirc, but is the primary way I passed clipboard stuff around between computers for many years.
Barrier (https://github.com/debauchee/barrier) was forked off of Synergy’s open-source version and might be worth a look.
Ooh, thanks. I’ve been using a really old, crufty version of Synergy.
Windows clip board already supports sharing content between machines. Just enable the “sync across devices” feature under settings/system/clipboard
^ This ^
Or alternatively use that onedrive stuff if you want to move files between machines.
You have to have a microsoft account for that, instead of a local user account.
It also syncs through the cloud, so internet access necessary, and your data belongs to MS now.
“that can run anywhere on the local network” …. I just use a Linux home server in my local network. Makes a great clipboard :) ! All Linux desktops (and VMs one of which is Windows), laptops, RPIs, etc. have access to a home file server with either NFS or SAMBA. The local server also is a redis sever, so all my IOT devices access it for information needed to perform their functions across the network. Simple.
I used synergia in windows vm under Linux in multi-gpu setup.. And I added laptop too to usein only one keyboard and mousee.. Bonus is easy copy paste over systems.. Not just files..
I use mouse without borders works great for clipboard stuff
MQTT is totally the wrong protocol for this solution. Why on earth would I want a hub-and-spoke solution to copy data point-to-point? Almost anything else would be better, my personal choice would be mDNS discovery + existing point to point file moving protocol such as https/scp/webdav etc…
Well, if you have multiple computers, then it is a point to multi-point setup…
That’s what I thought and thus MQTT looks perfect for this :)
Multicast then… e.g. UFTP. Although there’s nothing stopping transfer to multiple endpoints via my original suggestion.
Maybe if you already have an MQTT setup? When I have a hammer in hand, I see a LOT of nails.
Precisely, I always had a running MQTT broker in my home and its so light weight and reliable, i totally love using MQTT everywhere I can
Not universal solution (yet), but KDE Connect is worth mentioning as an alternative. //kdeconnect.kde.org/