vncserver启动报错root A VNC server is already running as :1
[root@42 ~]# service vncserver start
Starting VNC server: 1:root A VNC server is already running as :1
1:使用lsof命令查看5901端口
[root@42 sysconfig]# lsof -i tcp:5901
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
Xvnc 4711 root 5u IPv4 171906 0t0 TCP *:5901 (LISTEN)
2:查看当前用户后kill
[root@42 sysconfig]# vncserver -list
[root@42 sysconfig]# vncserver -kill :1
[root@42 ~]# service vncserver start
3:用户配置
配置/etc/sysconfig/vncservers文件
可修改vncserver用户和端口
#VNCSERVERS="1:root 2:test"
VNCSERVERSVNCSERVERARGS[1]="-geometry 1024x768 -alwaysshared"
VNCSERVERSVNCSERVERARGS[2]="-geometry 1024x768 -alwaysshared"
1:root 5901
2:test 5902
…
不希望root登陆就直接去掉
手机扫一扫
移动阅读更方便
你可能感兴趣的文章