优化 Ubuntu 上 VNC 速度可以从网络、VNC 服务器/客户端配置、桌面环境、系统参数四个方面入手。下面按实用程度给你一套完整方案。
Ubuntu 默认 GNOME 对 VNC 不友好,非常慢。
推荐桌面环境:
sudo apt install xfce4 xfce4-goodies
然后在 VNC 配置中指定使用 XFCE:
~/.vnc/xstartup
示例:
#!/bin/sh
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
exec startxfce4
✅ XFCE / MATE / LXDE 比 GNOME 快 3–5 倍
比默认 vnc4server 快且稳定。
sudo apt install tigervnc-standalone-server
启动:
vncserver :1 -geometry 1920x1080 -depth 24
vncserver -geometry 1366x768 -depth 16
或者使用客户端连接时设置:
如果使用 XFCE:
xfwm4-settings
关闭:
TigerVNC 推荐参数:
vncserver :1 -geometry 1366x768 -depth 16 -SecurityTypes None -compresslevel 6 -quality 6
客户端也建议:
如果你已经有了桌面会话:
sudo apt install x11vnc
x11vnc -display :0 -noxdamage -ncache 10
✅ 优点:
ssh -L 5901:localhost:5901 user@ubuntu_ip
然后 VNC 连接:
localhost:1
sudo systemctl disable bluetooth
sudo systemctl disable cups
sudo apt install lightdm
sudo dpkg-reconfigure lightdm
| 客户端 | 推荐度 |
|---|---|
| RealVNC Viewer | ⭐⭐⭐⭐ |
| TigerVNC Viewer | ⭐⭐⭐⭐⭐ |
| Remmina | ⭐⭐⭐⭐ |
| Windows 自带 | ❌ |
xrdp 示例:
sudo apt install xrdp
sudo systemctl enable xrdp
✅ Ubuntu + XFCE + TigerVNC + 16-bit + SSH Tunnel
vncserver :1 -geometry 1366x768 -depth 16
如果你愿意,可以告诉我:
我可以给你一份完全定制化的优化方案。