Crates.io | clipcast |
lib.rs | clipcast |
version | 0.1.1 |
source | src |
created_at | 2024-12-08 18:58:45.997271 |
updated_at | 2024-12-10 05:27:11.008889 |
description | A bidirectional clipboard synchronization tool that seamlessly connects local and remote machines over SSH, enabling real-time clipboard sharing with automatic reconnection and customizable clipboard handlers |
homepage | https://github.com/alfa07/clipcast |
repository | https://github.com/alfa07/clipcast |
max_upload_size | |
id | 1476552 |
size | 41,166 |
A Rust-based tool for synchronizing clipboards between local and remote machines over SSH. It continuously monitors clipboard changes on both ends and automatically syncs the content, making it easy to copy-paste between machines.
pbcopy
and pbpaste
(built-in)xclip
or similar (apt install xclip
)xclip
or similar clipboard toolclipcast
on local and remote machines# Install locally
cargo install clipcast
# Copy to remote machine (replace 'remote-host' with your host)
ssh remote-host "cargo install clipcast"
# Install Xvfb if not present
sudo apt install xvfb xclip
# Start Xvfb (typically on display :99)
Xvfb :99 -screen 0 1024x768x16 &
# Set DISPLAY variable
export DISPLAY=:99
The tool has two modes: server and client.
In server mode server gets messages over stdin and replys over stdout using one json message per line protocol. Server will be launched by the client on the remote machine.
clipcast server [OPTIONS]
Options:
--write-clipboard-cmd
: Command to write to clipboard (default: "xclip -selection clipboard")--read-clipboard-cmd
: Command to read from clipboard (default: "xclip -selection clipboard -o")Client using ssh
launches server on the remote host and syncs clipboards
between machines using json per line protocol over stdin and stdout.
clipcast client --host REMOTE_HOST [OPTIONS]
Options:
--host
: SSH host to connect to (required)--write-clipboard-cmd
: Local command to write to clipboard (default: "pbcopy")--read-clipboard-cmd
: Local command to read from clipboard (default: "pbpaste")--remote-server-cmd
: Remote clipcast command (default: "clipcast")--remote-write-clipboard-cmd
: Remote command to write to clipboard (default: "xclip -selection clipboard")--remote-read-clipboard-cmd
: Remote command to read from clipboard (default: "xclip -selection clipboard -o")Advanced usage with custom environment:
# On local machine, connecting to remote with specific environment setup
clipcast client \
--host remote-host \
--remote-server-cmd "source ~/.cargo/env && DISPLAY=:99 clipcast"
Clipboard Not Syncing
Connection Issues
Permission Errors
chmod +x
)RUST_LOG
: Controls logging level (default: "info")
Feel free to open issues and pull requests for:
This project is open source and available under the MIT License.