vncserver命令帮助
[root@localhost /]# vncserver --help
usage: vncserver [:<number>] [-name <desktop-name>] [-depth <depth>]
[-geometry <width>x<height>]
[-pixelformat rgbNNN|bgrNNN]
[-fp <font-path>]
[-fg]
<Xvnc-options>...
vncserver -kill <X-display>
vncserver –list
VNC服务器配置
[root@localhost /]# vncserver
You will require a password to access your desktops.
Password:
Verify:
New 'localhost.localdomain:1 (root)' desktop is localhost.localdomain:1
Creating default startup script /root/.vnc/xstartup
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/localhost.localdomain:1.log
开启VNC
[root@localhost /]# vncserver :1
New 'localhost.localdomain:1 (root)' desktop is localhost.localdomain:1
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/localhost.localdomain:1.log
关闭VNC
[root@localhost /]# vncserver -kill :1
Killing Xvnc process ID 20838
安装vnc客户端:vnc-installer-x86_win32.exe
客户端连接,比如服务器IP 192.168.13.221
192.168.13.221:1
当登录后,发现界面比较丑陋,可以查看/root/.vnc/xstartup:
其中有注释行
#Uncomment the following two lines for normal desktop: #unset SESSION_MANAGER #exec /etc/X11/xinit/xinitrc
修改成:
unset SESSION_MANAGER exec /etc/X11/xinit/xinitrc
重启vncserver就OK