Waymon
Wayland Mouse Over Network - A seamless input sharing solution for Wayland that allows you to control multiple computers with a single mouse and keyboard, similar to Synergy/Barrier but built specifically for modern Wayland compositors.
⚠️ Early Development Stage: This project is in active development. While the core functionality is working, expect breaking changes and rough edges. Contributions and feedback are welcome!
Features
Working
- ✅ Seamless mouse movement between computers by moving to screen edges
- ✅ Mouse button events (left, right, middle click)
- ✅ Keyboard input forwarding
- ✅ Secure SSH transport with key-based authentication
- ✅ Real-time TUI for monitoring connections and status
- ✅ Automatic input release on client disconnect
- ✅ Emergency release mechanisms (Ctrl+ESC, timeout, manual)
In Progress
- 🚧 Absolute mouse positioning
- 🚧 Cursor constraints
- 🚧 Improved display boundary detection
- 🚧 Edges detection and switching
- 🚧 Multiple monitor support on client
- 🚧 Multiple simultaneous client support
- 🚧 Clipboard synchronization (TBD)
How It Works
Waymon captures input events on the server (the one with the physical keyboard and mouse) using Linux's evdev interface, forwards them over an encrypted SSH connection to the client, and injects them using Wayland's virtual input protocols. When you move your mouse to the edge of your screen, control seamlessly switches between computers.
Requirements
Server (Computer being controlled)
- Linux with Wayland compositor
- Root/sudo access (for evdev input capture)
- SSH server
- Port 52525 available (configurable)
Client (Computer you're controlling from)
- Linux with Wayland compositor supporting:
zwp_virtual_pointer_v1 protocol
zwp_virtual_keyboard_v1 protocol
- SSH client with key-based authentication
Tested Compositors
- ✅ Hyprland
- ⚠️ GNOME Wayland (needs testing)
- ⚠️ KDE Wayland (needs testing)
Installation
From Source (Recommended during alpha)
git clone https://github.com/bnema/waymon.git
cd waymon
go build -o waymon .
sudo mv waymon /usr/local/bin/
The Go Install way
go install github.com/bnema/waymon@latest
Quick Start
-
On the server (computer to be controlled):
sudo waymon server
-
On the client (computer you're controlling from):
waymon client --host SERVER_IP:52525
-
First connection: You'll be prompted on the server to approve the client's SSH key
-
Start using: Move your mouse to the edge of the screen to switch control!
Server Controls
When running the server, you can use these keyboard shortcuts in the TUI:
- 0 or ESC: Return control to local (server) system
- 1-5: Switch control to connected client by number
- R: Manual emergency release (when controlling a client)
- Tab: Cycle through connected clients
- G/g: Navigate logs (bottom/top)
- Q: Quit server
Emergency Release
If input gets stuck while controlling a client, Waymon provides multiple release mechanisms:
- Ctrl+ESC: Emergency key combination (when grabbed)
- R key: Manual release in server TUI
- 30-second timeout: Automatic release after inactivity
- Client disconnect: Automatic release when client disconnects
- SIGUSR1: Send signal to server process:
sudo pkill -USR1 waymon
- Touch file: Create
/tmp/waymon-release to trigger release
Configuration
Waymon uses TOML configuration files. Create ~/.config/waymon/waymon.toml:
[server]
port = 52525
bind_address = "0.0.0.0"
name = "my-desktop"
max_clients = 1
ssh_whitelist_only = true
log_level = "INFO" # Set to "DEBUG" for troubleshooting
[client]
server_address = "192.168.1.100:52525"
auto_connect = false
reconnect_delay = 5
edge_threshold = 5
# Hotkey switching disabled by default during alpha
# hotkey_key = "s"
# hotkey_modifier = "ctrl+alt"
[display]
backend = "auto" # auto, wlr, sudo, or randr
Troubleshooting
Debug Logging
Enable debug logs by setting the environment variable:
sudo LOG_LEVEL=DEBUG waymon server
Common Issues
"Failed to grab device: device or resource busy"
- Another application may be using exclusive input access
- Try closing other input management tools
"Emergency release triggered"
- This is a safety feature - input was inactive for 30 seconds
- Increase timeout in code if needed (will be configurable soon)
Mouse clicks not working
- Fixed in latest version - update if you're on an older build
- Check debug logs for button mapping issues
Keyboard input showing wrong characters
- Keymap synchronization is not yet implemented
- Both systems should use the same keyboard layout
Architecture
graph LR
subgraph "Server (where physical mouse/keyboard are)"
direction TB
evdev["Linux Input Event Devices<br>(/dev/input/event*)"] --> server_app["Waymon Server Process<br>(captures evdev events)"]
end
subgraph "Client (controlled remotely)"
direction TB
client_app["Waymon Client Process<br>(receives events)"] --> virtual_input["Wayland Virtual Input<br>(injects events)"]
end
server_app -- "Input Events (Protobuf) over<br>Encrypted SSH Tunnel" --> client_app
Contributing
Contributions are welcome! Areas where help is needed:
- Testing on different Wayland compositors
- Security review
- Documentation improvements
- Bug reports and fixes
- Multiple monitor support
- TUI polish
License
MIT License - see LICENSE file for details
Acknowledgments
- Built with Bubble Tea for the TUI
- Uses Wish for SSH server
- Protocol Buffers for efficient serialization
- The Wayland community for protocol documentation