This is my personal Mac + Parallels Ubuntu setup. Fork it and have your AI tool adapt it to your environment.
Bidirectional communication between VMs and host machines, bypassing mosh/tmux clipboard limitations.
- Mosh has a ~12KB clipboard limit that truncates large content
- OSC 52 doesn't work reliably over mosh/tmux
- No way to trigger host operations from within VM
- Need bidirectional communication between VM and host
- Unlimited clipboard between VM and host (50MB+)
- Run commands on host from VM
- Run commands on VM from host
- File transfers between systems
- Notifications from VM to host
- URL opening on host from VM
- Extensible - add any command you need
- macOS host (10.211.55.2) with
mac_daemon_network.py
on port 9999 - Ubuntu VM (10.211.55.4) with
vm_daemon.py
on port 9998 - Python-based daemons for bidirectional communication
Command | Description | Direction |
---|---|---|
pbcopy |
Copy to Mac clipboard | VM→Mac |
pbpaste |
Paste from Mac clipboard | VM→Mac |
notify |
Show Mac notification | VM→Mac |
open_url |
Open URL in Mac browser | VM→Mac |
run_command |
Execute shell commands | Both ways |
read_file |
Read files | Both ways |
claude |
Run Claude CLI (if installed) | VM→Mac |
Edit the COMMANDS
dict in the daemon:
COMMANDS = {
'your_command': {
'binary': '/path/to/program',
'allow_stdin': True,
'allow_args': True,
'description': 'What it does'
}
}
# 1. Fork this repo on GitHub, then clone YOUR fork
git clone https://github.com/yourusername/vm-bridge
# 2. Have your AI adapt it
claude "Adapt this VM bridge for [your environment]"
# or
cursor "Make this work with my VMware/WSL2/Docker setup"
Your AI can:
- Update IPs for your network
- Change commands for your OS (pbcopy → clip.exe, etc.)
- Rewrite in your preferred language
- Add features you need
Mac:
python3 mac_daemon_network.py # Listens on 0.0.0.0:9999
Ubuntu VM:
python3 vm_daemon.py # Listens on 0.0.0.0:9998
python3 vm_client.py # Test it
mac_daemon_network.py
- Host daemon (receives from VM)vm_daemon.py
- VM daemon (receives from host)vm_client.py
- VM→Host clientmac_to_vm_test.py
- Host→VM test scriptbridge_demo.py
- Full demo
- IP whitelist (only local network)
- Command whitelist (no arbitrary execution)
- Size limits per command
- Direct binary execution (no shell injection)
MIT - Fork it, change it, make it work for you.