1、预设的 VNC 服务器:使用 twm window manager
VNC server 会在服务器端启动一个监听用户要求的端口,一般端口号码在 5901 ~ 5910 之间。当客户端启动 X server 联机到 5901 之后, VNC server 再将一堆预先设定好的 X client 透过这个联机传递到客户端上,最终就能够在客户端显示服务器的图形接口了。
不过需要注意的是,预设的 VNC server 都是独立提供给『单一』一个客户端来联机的,因此当你要使用 VNC 时, 再联机到服务器去启动 VNC server 即可。所以,一般来说, VNC server 都是使用手动启动的,然后使用完毕后, 再将 VNC server 关闭即可。整个作法其实很简单喔!你可以这样作:
# 2. 切换成 student,并且启动 VNC server 在 :5
[root@www ~]# su - student
[student@www ~]$ vncserver :5 -query localhost
You will require a password to access your desktops.
Password:
Verify:
xauth: creating new authority file /home/student/.Xauthority