Linux上VNC 启动和关闭
查询vnc的线程:
[admin@cn2-uat-esb-01-0001 ~]$ ps -ef|grep vnc
admin 19080 21305 0 10:04 pts/2 00:00:00 grep --color=auto vnc
admin 21719 1 0 09:59 pts/2 00:00:00 /usr/bin/Xvnc :1 -auth /home/admin/.Xauthority -desktop cn2-uat-esb-01-0001.novalocal:1 (admin) -fp catalogue:/etc/X11/fontpath.d -geometry 1024x768 -pn -rfbauth /home/admin/.vnc/passwd -rfbport 5901 -rfbwait 30000
admin 21732 1 0 09:59 pts/2 00:00:00 /bin/sh /home/admin/.vnc/xstartup
关闭vnc:
[admin@cn2-uat-esb-01-0001 ~]$ vncserver -kill :1
Killing Xvnc process ID 3346
重置密码:
[admin@cn2-uat-esb-01-0001 ~]$ vncpasswd
启动vnc:
[admin@cn2-uat-esb-01-0001 ~]$ vncserver :1
New 'cn2-uat-esb-01-0001.novalocal:1 (admin)' desktop is cn2-uat-esb-01-0001.novalocal:1
Starting applications specified in /home/admin/.vnc/xstartup
Log file is /home/admin/.vnc/cn2-uat-esb-01-0001.novalocal:1.log