VNC Startup and shutdown FAQs on Linux

Source: Internet
Author: User
Tags auth

0, Reset Password

[Email protected] ~]# VNCPASSWD
Password:
Verify:
[Email protected] ~]#

1, start and 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
[Email protected] ~]# 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
[[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/roo t/. 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/roo t/. 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

Manual kill:1,: 1 pid is 12572, and verify that: 1 has indeed been killed

[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/roo t/. 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

By Vncserver Kill:1,:2, this is the best way to recommend the use of

[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
[Roo[email protected] ~]# ls/root/.vnc/
passwd Xstartup Yqrh5u2:1.log Yqrh5u2:2.log

2, restart a manual kill Vncserver,

Because it is manually deleted, so you want to delete the lock files before you can restart,

[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/roo t/. 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/roo t/. 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/roo t/. 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] ~]#

VNC Startup and shutdown FAQs on Linux

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.