You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
![]() |
2 months ago | |
---|---|---|
.gitignore | 5 months ago | |
LICENSE | 5 months ago | |
README.md | 5 months ago | |
cn-loop | 5 months ago | |
shared-clipboard | 2 months ago | |
shared-clipboard-hub | 5 months ago |
README.md
shared-clipboard
Share X11 clipboards over the network
Rationale
I often have 2 laptops running side-by-side, and I sometimes want to communicate tiny bits of text between them. I've imagined being able to share copy buffers between computers over the network for a while, and I finally did it today. 2022-02-08.
I made a post after I wrote this to see how other people would solve this problem, and I got some interesting solutions. I probably should have asked first before coding my own shared clipboard, but it was fun.
Prerequisites
- clipnotify (compile and install)
- ncat
- xsel
- perl
Installation
sudo apt install -y libxfixes-dev ncat libjson-perl xsel
git clone https://github.com/cdown/clipnotify.git
cd clipnotify
make
cp clipnotify ~/.local/bin/
cd ..
git clone https://git.coom.tech/gg1234/shared-clipboard.git
cd shared-clipboard
cp cn-loop shared-clipboard-hub shared-clipboard ~/.local/bin/
Usage
Choose one machine to act as a hub for everyone.
# Assume its IP is 192.168.1.3 for our example.
shared-clipboard-hub 7777
Every client that wants to share their clipboard should run something like this.
shared-clipboard 192.168.1.3 7777
You need at least 2 clients to make this meaningful. To see it in action, start copying text.