Arch:安装VNC
sudo pacman -S tigervnc
vncpasswd
# ~/.vnc/config
session=plasma
geometry=1920x1080
# localhost
# only accepts connection from localhost
alwaysshared
# /etc/tigervnc/vncserver.users
:1=riguz
systectl start vncserver@:1.service
应为tigervnc的登录认证不是很安全,推荐的做法是只允许localhost,然后通过ssh隧道连接
ssh 10.226.31.2 -L 5901:localhost:5901
vncviewer localhost:1
Ubuntu
sudo apt-get install tigervnc-standalone-server tigervnc-xorg-extension tigervnc-viewer
sudo apt install xterm
# vncserver will fail!
Session startup via '/etc/X11/Xtigervnc-session' cleanly exited too early (< 3 seconds)!
Maybe try something simple first, e.g.,
tigervncserver -xstartup /usr/bin/xterm
The Xtigervnc server cleanly exited!
The X session cleanly exited!
tigervncserver -xstartup /usr/bin/xterm
vncserver -list
TigerVNC server sessions:
X DISPLAY # RFB PORT # RFB UNIX PATH PROCESS ID # SERVER
1 5901 2047124 Xtigervnc