Share Your Clipboard Across Machines Using MQTT

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.

21 thoughts on “Share Your Clipboard Across Machines Using MQTT

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

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

  3. “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.

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

  4. 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…

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.