VNC Clipboard Sharing: Copy-Paste Between Local and Remote
Seamlessly copy and paste between your local machine and remote desktop. Learn VNC clipboard protocols, troubleshooting, and security considerations.
VNC clipboard sharing lets you copy text on your local machine and paste it on the remote desktop (and vice versa). This essential feature bridges the gap between local and remote workflows.
How VNC Clipboard Works
VNC clipboard sharing synchronizes clipboard content between client and server:
Local Mac (Copy) → VNC Client → VNC Server → Remote Desktop (Paste)
Remote Desktop (Copy) → VNC Server → VNC Client → Local Mac (Paste)
Enabling Clipboard Sharing
FoxTerm (Recommended)
FoxTerm enables clipboard sharing by default:
- Open VNC connection
- Clipboard sync is automatic
- Copy on Mac → Paste on remote (and vice versa)
TigerVNC
vncviewer -SendClipboard -AcceptClipboard server:5900
RealVNC
Clipboard sharing enabled by default in VNC Connect.
TightVNC
vncviewer -SendClipboard -AcceptClipboard server:5900
Clipboard Formats
Text (Universal)
Plain text works across all platforms:
- macOS ↔ Linux
- macOS ↔ Windows
- Linux ↔ Windows
Rich Text (Limited)
Some VNC implementations support rich text:
- Formatting preserved
- Images included
- Platform-specific (may not work cross-platform)
Files (Not Supported)
VNC clipboard typically doesn't support file copying. Use SFTP for file transfers.
Troubleshooting
Problem: Clipboard Not Syncing
Check 1: Enable clipboard in client
# TigerVNC
vncviewer -SendClipboard -AcceptClipboard server:5900
Check 2: Check VNC server config
# /etc/vnc/config or ~/.vnc/config
Clipboard=yes
Check 3: Restart VNC server
vncserver -kill :1
vncserver :1
Problem: Chinese Characters Corrupted
Solution: Ensure UTF-8 encoding
# Set locale on remote
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
Problem: Clipboard Works One Way
Check client settings:
-SendClipboard— Send local clipboard to remote-AcceptClipboard— Accept remote clipboard to local
Both must be enabled for bidirectional sync.
Problem: Large Text Fails
VNC clipboard has size limits. For large content:
- Use SFTP to transfer files
- Break into smaller chunks
- Use SSH tunnel for unlimited transfer
Advanced Clipboard Features
Clipboard History
FoxTerm maintains clipboard history:
- Last 10 clipboard items
- Quick access to recent copies
- Search and filter
- Pin important items
Clipboard Manager
# On remote Linux
# Install clipboard manager
sudo apt install clipit
# Run clipit
clipit &
Custom Clipboard Scripts
#!/bin/bash
# clipboard-sync.sh - Sync clipboard to file
while true; do
# Monitor clipboard changes
xclip -selection clipboard -o > /tmp/clipboard.txt 2>/dev/null
sleep 1
done
Security Considerations
Clipboard Sniffing
Risk: Malicious apps on remote can read clipboard
Mitigation:
- Disable clipboard when not needed
- Clear clipboard after sensitive operations
- Use password managers instead of clipboard
Sensitive Data
Avoid copying:
- Passwords
- API keys
- Credit card numbers
- Personal information
Better approach:
- Use password managers
- SSH agent for keys
- Secure file transfer for documents
Platform-Specific Notes
macOS
Clipboard works seamlessly with:
- Command+C / Command+V
- Universal Clipboard (iCloud sync)
- Paste history (third-party apps)
Linux
Clipboard systems:
- X11:
xclip,xsel - Wayland:
wl-copy,wl-paste
# X11
echo "text" | xclip -selection clipboard
xclip -selection clipboard -o
# Wayland
echo "text" | wl-copy
wl-paste
Windows
Clipboard works natively:
- Ctrl+C / Ctrl+V
- Clipboard history (Win+V)
- Cloud clipboard (Microsoft account)
FoxTerm Clipboard Features
FoxTerm enhances VNC clipboard with:
Smart Clipboard
- Auto-detect content type (text, URL, code)
- Format-aware pasting
- Strip formatting when needed
- Preserve line endings
Clipboard Actions
- Copy selection automatically
- Paste with formatting options
- Clear clipboard history
- Export clipboard to file
Integration
- Sync with macOS clipboard
- Share across VNC sessions
- Clipboard notifications
- Quick paste menu
Best Practices
- Enable clipboard — Use
-SendClipboard -AcceptClipboard - Test early — Verify clipboard works before starting work
- Clear sensitive data — Clear clipboard after copying passwords
- Use alternatives — SFTP for files, password managers for credentials
- Monitor size — Avoid very large clipboard content
- Check encoding — Ensure UTF-8 for non-ASCII characters
- Restart if broken — Restart VNC server if clipboard stops working
Conclusion
VNC clipboard sharing is essential for productive remote desktop workflows. When configured correctly, it provides seamless copy-paste between local and remote systems.
FoxTerm makes clipboard sharing reliable and feature-rich, with smart detection and history management.
FoxTerm Pro includes advanced VNC clipboard management. Download at foxterm.app.