Linux上VNC 啟動和關閉 常見問題
0, 重設密碼
[[email protected] ~]# vncpasswd
Password:
Verify:
[[email protected] ~]#
1,啟動和kill vncserver
[[email protected] ~]# 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
[
New 'yqrh5u2:2 (root)' desktop is yqrh5u2:2
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/yqrh5u2:2.log
[[email protected] ~]# 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
[[email protected] ~]# kill -9 12572
[[email protected] ~]# 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,這是最好的方法,推薦使用
[[email protected] ~]# vncserver -kill :1
Killing Xvnc process ID 12572
kill 12572: No such process
[[email protected] ~]# vncserver -kill :2
Killing Xvnc process ID 12617
[[email protected] ~]# ls /root/.vnc/
passwd xstartup yqrh5u2:1.log yqrh5u2:2.log
2,重新啟動一個手動kill的vncserver,
因為是手動自己刪除的,所以要再刪除一下被lock的檔案,才可以重新啟動,如圖所示
[[email protected] ~]# 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
[[email protected] ~]# 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
[[email protected] ~]# rm -f /tmp/.X1-lock
[[email protected] ~]# 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
[[email protected] ~]# 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
[[email protected] ~]# rm -f /tmp/.X11-unix/X1
[[email protected] ~]# 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
[[email protected] ~]# 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
[[email protected] ~]#
相關推薦
Linux上VNC 啟動和關閉 常見問題
0, 重設密碼 [[email protected] ~]# vncpasswd Password: Verify: [[email protected] ~]# 1,啟動和kill vncserver
在Linux平臺下啟動和關閉MySQL服務
首先需要檢視下載MySQL服務的狀態 [[email protected] bin]# netstat -nlp Active Internet connections (only servers) Proto Recv-Q Send-Q Local Addr
Linux平臺下啟動和關閉mysql服務
一、linux下檢視mysql服務的兩種方式: 方式一: [root@localhost bin]ps -ef|grep mysql 方式二: [root@localhost bin]net
linux中nginx啟動和關閉
啟動程式碼格式:nginx安裝目錄地址 -c nginx配置檔案地址 例如: [root@ettest app]# /usr/sbin/nginx -c /etc/nginx/nginx.conf 停止的方法: 停止的方法有三種: 第一種: 1.檢視程序命令
Linux上oracle資料庫的關閉和啟動
1)orcl資料庫的啟動: 第一步:首先使用root使用者登入到Linux作業系統,然後切換到oracle使用者下 ,輸入命令: su oracle 第二部:切換到oracle使用者下,然後在該使用者下輸入命令:sqlplus /nolog 第三部:使用管理員許可權登入,輸
windows和Linux下定時啟動或關閉服務
ref sta article start 處理程序 window pin blog win http://blog.csdn.net/clare504/article/details/17410643 1、Windows下的定時啟動程序可以采用系統的計劃和任務,定時
Linux下用jenkins用指令碼啟動和關閉tomcat報錯Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
用vim開啟tomcat的bin目錄下的setclasspath.sh,新增JAVA_HOME和JRE_HOME兩個環境變數(下圖紅色方框內),兩個環境變數路徑為您安裝的java JDK的路徑。 使用 echo $JAVA_HOME 能定位JDK安裝路徑的前
linux下php-fpm的啟動和關閉
檢視php-fpm的地址 whereis php-fpm 啟動php-fpm /usr/local/php5/sbin/php-fpm # /usr/local/php5/為php-fpm的安裝地址 /usr/local/php-5.6.3/sbin
Linux下oracle資料庫啟動和關閉操作
第一步:登陸 root登陸之後切換到oracle使用者上,輸入 <span><strong>su oracle</strong></span>第二步:連線 在oracle使用者下,輸入 <span><strong>sqlplus /n
linux下啟動和關閉網絡卡命令
ifup、ifdown:linux命令 實時地手動修改一些網路介面引數,可以利用ifconfig來實現,如果是要直接以配置檔案,亦即是在 /etc/sysconfig/network-scripts裡面的ifcfg-ethx等檔案的設定引數來啟動的話,那就得要通過i
轉:linux下啟動和關閉網絡卡命令
http://blog.sina.com.cn/s/blog_439f80c40101g54x.html 作者寫的很詳細。儲存下來,方便以後查詢,非常感謝 ifup、ifdown:linux命令 實時地手動修改一些網路介面引數,可以利用ifconfig來實現,如果是要直接以配置
Redis在Linux下的安裝、啟動和關閉
安裝 使用apt命令安裝 安裝命令 sudo apt install redis-server 使用make編譯安裝 安裝命令 wget http://download.redis.io/releases/redis-4.0.10.tar.gz
linux實戰-redis(2) -- 配置redis的伺服器啟動和關閉
=====================redis配置================================== 上一篇文章我們已經完成了對redis的安裝,接下來就可以按照上面的方法使用,但是這裡還存在一些小問題,那就是linux系統重啟之後都
在Ubuntu/Linux環境下使用MySQL:啟動和關閉MySQL服務
作業系統:Ubuntu 17.04 64位 MySQL版本:MySQL 5.7 一、啟動MySQL服務 使用以下命令來啟動MySQL: service mysql start 順便提一下,serv
Linux啟動和關閉時自動執行的所有指令碼檔案
原文地址:http://www.cnblogs.com/armlinux/archive/2010/08/11/2390949.html Linux使用的是基於執行級(run-levels)概念的稱為SysVinit的專用啟動工具。SysVinit(從現在開始我
Linux 環境下MongoDB 啟動和關閉
場景:運維時,需要對mongodb 服務進行操作 一、mongod的啟動和關閉 mogodb 啟動 1. 預設的啟動方式 ./mongod 預設的啟動方式,資料儲存目錄裡是/
將jenkins部署到tomcat上,使用tomcat啟動和關閉
1、下載tomcat壓縮包解壓 2、下載jenkins解壓 3、將jenkins.war放入tomcat的webapps目錄下 4、修改tomcat的conf資料夾下的server.xml中的埠資訊(一般將8080修改為其他埠,避免衝突) 5、進入tomcat的bin目錄,
linux後臺運行和關閉、查看後臺任務
ctrl+z ctrl+c .com nat 執行 opp 後臺進程 查看 用戶 fg、bg、jobs、&、nohup、ctrl+z、ctrl+c 命令 一、& 加在一個命令的最後,可以把這個命令放到後臺執行,如 watch -n 10 sh
[Linux]在終端啟動程序關閉終端不退出的方法
con test track post hup 命令 -a ont 終端 ?? 在終端啟動程序關閉終端不退出的方法 普通情況下關閉終端時,那麽在這個終端中啟動的後臺程序也會終止。要使終端關閉後,後臺程序保持運行,使用這個指令: nohup 命令 & 如:n
mysql啟動和關閉外鍵約束的方法
word nbsp 查看 set 外鍵約束 mysql 輸入 check select 關閉外鍵約束,輸入命令:SET FOREIGN_KEY_CHECKS=0; 啟動外鍵約束,輸入命令:SET FOREIGN_KEY_CHECKS=1; 查看當前是否有外鍵約束:SELEC