Linux上VNC 启动和关闭常见问题
0, 重设密码
[root@yqrh5u2 ~]# vncpasswd
Password:
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 ~]#
Linux上VNC 启动和关闭常见问题的更多相关文章
- Linux上VNC 启动和关闭
查询vnc的线程: [admin@cn2-uat-esb-01-0001 ~]$ ps -ef|grep vncadmin 19080 21305 0 10:04 pts/2 00:00:00 gre ...
- linux上安装启动elasticsearch-5.5.1完整步骤
linux上安装启动elasticsearch-5.5.1完整步骤 学习了:https://blog.csdn.net/hingcheung/article/details/77144574 http ...
- 解决SSH窗口关闭,linux上的应用也关闭
最近在应用linux上的服务的时候发现一个问题 使用SSH远程连接启动的应用在SSH关闭的时候也死掉了,网上查了一下原因 大致是说SSH在关闭的时候会发送一个终止的指令给应用,然后就停了 简要的解决办 ...
- 解决Linux上tomcat启动却无法访问
linux中tomcat的安装 安装tomcat前首先要安装对应的jdk并配置Java环境 下载tomcat安装包 下载路径:https://tomcat.apache.org/download-80 ...
- linux下如何启动和关闭weblogic .
在你定义的域中可以找到如下命令: /[youHome]/domains/[yourDomain]/startWebLogic.sh /[youHome]/domains/[yourDomain]/st ...
- Linux上jmeter-server启动失败
Jmeter-server启动失败:Cannot start. Unable to get local host IP address. is a loopback address 在Windows下 ...
- Linux上VNC常见命令
参考链接: http://blog.csdn.net/russle/article/details/4757888 http://www.linuxidc.com/Linux/2016-06/1320 ...
- linux中如何启动和关闭svn
1,启动SVN sudo svnserve -d -r /home/data/svn/ 其中 -d 表示守护进程, -r 表示在后台执行 /home/data/svn/ 为svn的安装目录 2,关闭 ...
- 160524、Linux下如何启动、关闭Oracle以及打开关闭监听
1. linux下启动oraclesu - oraclesqlplus /nologconn /as sysdbastartupexitlsnrctl startexit2. linux下关闭orac ...
随机推荐
- php判断所在的客户端
//判断是否是手机 function is_mobile() { $agent = strtolower($_SERVER['HTTP_USER_AGENT']); $is_pc = (strpos( ...
- windows下winscp连接ubuntu
在ubuntu下安装ssh: sudo apt-get install openssh-server 即可解决.
- 【转】MongoDB学习笔记(查询)
原文地址 MongoDB学习笔记(查询) 基本查询: 构造查询数据. > db.test.findOne() { "_id" : ObjectId("4fd58ec ...
- Greenplum-cc-web监控软件安装
一环境列表 操作系统 centos6.5 64 Greenplum版本: greenplum-db-4.3.5.3-build-2-RHEL5-x86_64.tar Greenplum集群环境搭建: ...
- nvm安装node和npm,个人踩坑记录
我采用nvm-setup安装windows版本的nvm nvm安装node出现的问题: 1.node成功了,npm没成功 解决:在nvm 安装了node之后,输入npm找不到该命令,当时安装报错如下: ...
- EF跨库查询,DataBaseFirst下的解决方案
出于各种原因,有时需要跨数据库访问某些数据表,有同学已经给出了解决方案,比如 http://blog.csdn.net/hanjun0612/article/details/50475800 已经解 ...
- nginx隐藏server信息和版本信息
1.隐藏版本信息 在nginx.conf里面添加 server_tokens off; 2.隐藏server信息 需要重新编译ngnix进入解压出来的nginx 源码目录 vi src/http/ng ...
- 详解BarTender选项大小调整模式
BarTender大小调整模式是DotCode码制独有的符号体系特殊选项.DotCode 符号可能在形状上有所不同,包括从接近正方形的点阵到细长的色带,而“大小调整模式”选项通过指定点阵的配置来确定 ...
- 【MySQL】[Err] [Imp] 2006 - MySQL server has gone away .
wait_timeout= interactive_timeout = max_allowed_packet=10M my.ini 后面增加 就可以解决
- Docker安装指南
Ubuntu 14.04 16.04 (使用apt-get进行安装) # step 1: 安装必要的一些系统工具 sudo apt-get -y update sudo apt-get -y inst ...