Linux上VNC 启动和关闭 已经常见问题
来源:互联网 发布:盘点后的数据如何导入 编辑:程序博客网 时间:2024/06/06 15:47
本文转自:http://blog.sina.com.cn/s/blog_770799310101htzj.html
0, 重设密码
[root@yqrh5u2 ~]# vncpasswdPassword:
Verify:
[root@yqrh5u2 ~]#
1,启动和kill vncserver
[root@yqrh5u2 ~]# vncserver :1
New 'yqrh5u2:1 (root)' desktop is yqrh5u2:1
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/yqrh5u2:1.log
[root@yqrh5u2 ~]# vncserver :2
New 'yqrh5u2:2 (root)' desktop is yqrh5u2:2
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/yqrh5u2:2.log
[root@yqrh5u2 ~]# ps -ef|grep -i vnc
root 12572 1 0 02:23 pts/2 00:00:00 Xvnc :1 -desktop yqrh5u2:1 (root) -httpd /usr/share/vnc/classes -auth /root/.Xauthority -geometry 1024x768 -depth 16 -rfbwait 30000 -rfbauth /root/.vnc/passwd -rfbport 5901 -pn
root 12580 1 0 02:23 pts/2 00:00:00 vncconfig -iconic
root 12617 1 0 02:23 pts/2 00:00:00 Xvnc :2 -desktop yqrh5u2:2 (root) -httpd /usr/share/vnc/classes -auth /root/.Xauthority -geometry 1024x768 -depth 16 -rfbwait 30000 -rfbauth /root/.vnc/passwd -rfbport 5902 -pn
root 12625 1 0 02:23 pts/2 00:00:00 vncconfig -iconic
root 12735 12536 0 02:24 pts/2 00:00:00 grep -i vnc
手动kill :1, :1的pid是12572,并验证:1确实已经被kill
[root@yqrh5u2 ~]# kill -9 12572
[root@yqrh5u2 ~]# ps -ef|grep -i vnc
root 12617 1 0 02:23 pts/2 00:00:00 Xvnc :2 -desktop yqrh5u2:2 (root) -httpd /usr/share/vnc/classes -auth /root/.Xauthority -geometry 1024x768 -depth 16 -rfbwait 30000 -rfbauth /root/.vnc/passwd -rfbport 5902 -pn
root 12625 1 0 02:23 pts/2 00:00:00 vncconfig -iconic
root 12779 12536 0 02:25 pts/2 00:00:00 grep -i vnc
通过vncserver kill :1,:2,这是最好的方法,推荐使用
[root@yqrh5u2 ~]# vncserver -kill :1
Killing Xvnc process ID 12572
kill 12572: No such process
[root@yqrh5u2 ~]# vncserver -kill :2
Killing Xvnc process ID 12617
[root@yqrh5u2 ~]# ls /root/.vnc/
passwd xstartup yqrh5u2:1.log yqrh5u2:2.log
2,重新启动一个手动kill的vncserver,
因为是手动自己删除的,所以要再删除一下被lock的文件,才可以重新启动,如图所示
[root@yqrh5u2 ~]# vncserver
Warning: yqrh5u2:1 is taken because of /tmp/.X1-lock
Remove this file if there is no X server yqrh5u2:1
New 'yqrh5u2:2 (root)' desktop is yqrh5u2:2
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/yqrh5u2:2.log
[root@yqrh5u2 ~]# vncserver :1
Warning: yqrh5u2:1 is taken because of /tmp/.X1-lock
Remove this file if there is no X server yqrh5u2:1
A VNC server is already running as :1
[root@yqrh5u2 ~]# rm -f /tmp/.X1-lock
[root@yqrh5u2 ~]# vncserver :1
Warning: yqrh5u2:1 is taken because of /tmp/.X11-unix/X1
Remove this file if there is no X server yqrh5u2:1
A VNC server is already running as :1
[root@yqrh5u2 ~]# ps -ef|grep -i vnc
root 12971 1 0 02:32 pts/2 00:00:00 Xvnc :2 -desktop yqrh5u2:2 (root) -httpd /usr/share/vnc/classes -auth /root/.Xauthority -geometry 1024x768 -depth 16 -rfbwait 30000 -rfbauth /root/.vnc/passwd -rfbport 5902 -pn
root 12979 1 0 02:32 pts/2 00:00:00 vncconfig -iconic
root 13047 12536 0 02:33 pts/2 00:00:00 grep -i vnc
[root@yqrh5u2 ~]# rm -f /tmp/.X11-unix/X1
[root@yqrh5u2 ~]# vncserver :1
New 'yqrh5u2:1 (root)' desktop is yqrh5u2:1
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/yqrh5u2:1.log
[root@yqrh5u2 ~]# ps -ef|grep -i vnc
root 12971 1 0 02:32 pts/2 00:00:00 Xvnc :2 -desktop yqrh5u2:2 (root) -httpd /usr/share/vnc/classes -auth /root/.Xauthority -geometry 1024x768 -depth 16 -rfbwait 30000 -rfbauth /root/.vnc/passwd -rfbport 5902 -pn
root 12979 1 0 02:32 pts/2 00:00:00 vncconfig -iconic
root 13071 1 1 02:33 pts/2 00:00:00 Xvnc :1 -desktop yqrh5u2:1 (root) -httpd /usr/share/vnc/classes -auth /root/.Xauthority -geometry 1024x768 -depth 16 -rfbwait 30000 -rfbauth /root/.vnc/passwd -rfbport 5901 -pn
root 13092 1 0 02:33 pts/2 00:00:00 vncconfig -iconic
root 13123 12536 0 02:34 pts/2 00:00:00 grep -i vnc
[root@yqrh5u2 ~]#
阅读全文
0 0
- Linux上VNC 启动和关闭 已经常见问题
- Linux上VNC 启动和关闭 已经常见问题
- Linux上VNC 启动和关闭 已经常见问题
- Linux上VNC 启动和关闭 已经常见问题
- Linux上VNC 启动和关闭 常见问题
- Linux上VNC 启动和关闭 以及常见问题
- Centos上VNC 启动和关闭 常见问题汇总
- linux上启动关闭resin
- Linux上oracle数据库的关闭和启动
- linux启动vnc服务
- linux svn启动和关闭
- linux svn启动和关闭
- linux svn启动和关闭
- Linux SVN启动和关闭
- Linux下Jboss启动、关闭、端口配置等常见问题FAQ
- 在Linux上自动启动和关闭Oracle数据库(9i/10g/11g)
- linux下启动VNC服务
- 启动linux下的VNC
- ssh文件的上传
- 解决win7 处理器,安装内存不可用
- HDU 1829
- NOSQL EYE开源
- flume日志抓取设计
- Linux上VNC 启动和关闭 已经常见问题
- POJ 2159 Ancient Cipher
- 3分钟完成在VS创建一个DLL并调用
- MongoDb 入门教程
- POJ 3186
- Spring Data JPA
- ip,tcp,icmp,udp校验
- CocosCreator中如何定义枚举Enum
- 基于UCOSII的DMA-SPI通信