VNC工具的使用
vncserver -list
vncserver #开启的端口号默认排序
vncserver :1 #开启指定的端口号,中间+空格
vncpasswd
Password:
Verify:
方法一:
vncserver -list #查看vnc的端口号
TigerVNC server sessions:
X DISPLAY # PROCESS ID
:1 8881
vncserver -kill :1 #kill相关端口号
方法二:
ps -ef |grep vnc
kill -9 进程号
Warning: qone1:1 is taken because of /tmp/.X1-lock
Remove this file if there is no X server qone1:1
A VNC server is already running as :1
Warning: qone1:1 is taken because of /tmp/.X1-lock 从这里可以看出提示已经存在此配置
Remove this file if there is no X server qone1:1
New 'qone1:2 (oracle)' desktop is qone1:2 #所以开启1失败,默认开启了2端口
Starting applications specified in /home/oracle/.vnc/xstartup
Log file is /home/oracle/.vnc/qone1:2.log
rm -rf .X11-unix/
rm -rf .X1-lock #所以要进到tmp目录下,删除之前文件的缓存,此文件为隐藏文件,直接补全即可
vncserver :1 #从新启动该端口即可