Install the Remote Desktop Server software VNC Server and centos6.5vnc under CentOS6.5
VNC allows you to remotely access and control your computer from another computer or mobile device, wherever you are in the world. Common Use Cases include providing desktop support to colleagues and friends, and Remotely Managing Your servers.
Deploy the VNC Server to the computer you want to control, and use the VNC Viewer to connect to the computer you want to control.
Installation Service:
Yum install tigervnc-server
This name is a bit strange. If you never know it, you cannot guess it.
[root@localhost ~]# yum install tigervnc-serverLoaded plugins: fastestmirror, refresh-packagekit, securityLoading mirror speeds from cached hostfile * base: mirror.bit.edu.cn * extras: mirrors.yun-idc.com * updates: mirrors.yun-idc.comSetting up Install ProcessResolving Dependencies--> Running transaction check---> Package tigervnc-server.x86_64 0:1.1.0-8.el6_5 will be installed--> Finished Dependency ResolutionDependencies Resolved=============================================================================================================================================================================================== Package Arch Version Repository Size===============================================================================================================================================================================================Installing: tigervnc-server x86_64 1.1.0-8.el6_5 updates 1.1 MTransaction Summary===============================================================================================================================================================================================Install 1 Package(s)Total download size: 1.1 MInstalled size: 2.9 MIs this ok [y/N]: yDownloading Packages:tigervnc-server-1.1.0-8.el6_5.x86_64.rpm | 1.1 MB 00:02 Running rpm_check_debugRunning Transaction TestTransaction Test SucceededRunning Transaction Installing : tigervnc-server-1.1.0-8.el6_5.x86_64 1/1 Verifying : tigervnc-server-1.1.0-8.el6_5.x86_64 1/1 Installed: tigervnc-server.x86_64 0:1.1.0-8.el6_5 Complete!
Run and set the password:
Vncserver: 1
Note: There must be spaces between vncserver and: 1.
Enter the password to generate related files.
[root@localhost ~]# vncserver :1You will require a password to access your desktops.Password:Verify:xauth: creating new authority file /root/.XauthorityNew 'localhost.localdomain:1 (root)' desktop is localhost.localdomain:1Creating default startup script /root/.vnc/xstartupStarting applications specified in /root/.vnc/xstartupLog file is /root/.vnc/localhost.localdomain:1.log
Configure the user
Vim/etc/sysconfig/vncservers
Add the last line:
VNCSERVERS = "1: root" separated by Spaces
Practical command: usage: vncserver [: <number>] [-name <desktop-name>] [-depth <depth>]
[-Geometry <width> x [-Pixelformat rgbNNN | bgrNNN]
[-Fp <font-path>]
[-Fg]
<Xvnc-options>...
Vncserver-kill <X-display>
Vncserver-list
Vncserver [: n] Service Activation
Several vncserver-list statements are running.
Vncserver-kill: n kills the nth x-display
Vncpasswd Change Password
Service Management service vncserver restart
Other usage:/etc/init. d/vncserver {start | stop | restart | try-restart | status | force-reload}
Chkconfig vncserver on is added to self-start (chkconfig -- level 35 vncserver on)
Client Connection
CentOS: Use TigerVNC Viewer to connect to ip Address: 1
Windows: use Real VNC Viewer to connect to ip Address: 1
Enter the password to access
Error records and solutions:
Error message: [root @ localhost media] # service vncserver startStarting VNC server: 1: root WARNING: The first attempt to start Xvnc failed, possibly because the fontcatalog is not properly configured. attempting to determine an appropriatefont path for this system and restart Xvnc using that font path... cocould not start Xvnc. /usr/bin/Xvnc: symbol lookup error:/usr/bin/Xvnc: undefined symbol: pixman_composite _ Trapezoids/usr/bin/Xvnc: symbol lookup error:/usr/bin/Xvnc: undefined symbol: FAILED [FAILED] solution: yum install pixman-devel xlibfont error record: [root @ localhost/] # vncserver: 1 WARNING: The first attempt to start Xvnc failed, possibly because the fontcatalog is not properly configured. attempting to determine an appropriatefont path for this system and restart Xvnc using that Font path... cocould not start Xvnc. _ XSERVTransSocketUNIXCreateListener :... socketCreateListener () failed_XSERVTransMakeAllCOTSServerListeners: server already runningFatal server error: Cannot establish any listening sockets-Make sure an X server isn't already restart :... socketCreateListener () failed_XSERVTransMakeAllCOTSServerListeners: server already runningFat Al server error: Cannot establish any listening sockets-Make sure an X server isn' t already running Solution Process: ps aux | grep-I "xorg | x11" yum-y groupinstall "GNOME Desktop Environment" CentOS6.5 is unavailable. Yum groupinstall "X Window System" "KDE (K Desktop Environment)" rm-rf/tmp /. x11-unix error record: [root @ hn opt] # vncserver: 1 Warning: hn. kd. ny. adsl: 1 is taken because of/tmp /. x1-lockRemove this file if there is no X server hn. kd. ny. adsl: 1A VNC server is already running as: 1 [root @ hn opt] # cp/tmp /. x1-lock X1-lock.bak [root @ hn opt] # rm-rf/tmp /. x1-lock [root @ hn opt] # vncserver: 1 Warning: hn. kd. ny. adsl: 1 is taken because of/tmp /. x11-unix/X1Remove this file if there is no X server hn. kd. ny. adsl: 1A VNC server is already running as: 1 [root @ hn opt] # vncserver: 1 Warning: hn. kd. ny. adsl: 1 is taken because of/tmp /. x11-unix/X1Remove this file if there is no X server hn. kd. ny. adsl: 1A VNC server is already running as: 1 [root @ hn opt] # rm-rf/tmp /. x11-unix/X1 [root @ hn opt] # vncserver: 1 xauth: creating new authority file/root /. xauthorityWARNING: The first attempt to start Xvnc failed, possibly because the fontcatalog is not properly configured. attempting to determine an appropriatefont path for this system and restart Xvnc using that font path... cocould not start Xvnc. _ XSERVTransSocketUNIXCreateListener :... socketCreateListener () failed_XSERVTransMakeAllCOTSServerListeners: server already runningFatal server error: Cannot establish any listening sockets-Make sure an X server isn't already restart :... socketCreateListener () Listener: server already runningFatal server error: Cannot establish any listening sockets-Make sure an X server isn' t already running is starting VNC server: 1: root WARNING: the first attempt to start Xvnc failed, possibly because the fontcatalog is not properly configured. attempting to determine an appropriatefont path for this system and restart Xvnc using that font path... cocould not start Xvnc. _ XSERVTransSocketUNIXCreateListener :... socketCreateListener () failed_XSERVTransMakeAllCOTSServerListeners: server already runningFatal server error: Cannot establish any listening sockets-Make sure an X server isn't already restart :... socketCreateListener () Listener: server already runningFatal server error: Cannot establish any listening sockets-Make sure an X server isn' t already running [failed] Starting VNC server: 1: root WARNING: the first attempt to start Xvnc failed, possibly because the fontcatalog is not properly configured. attempting to determine an appropriatefont path for this system and restart Xvnc using that font path... cocould not start Xvnc. _ XSERVTransSocketUNIXCreateListener :... socketCreateListener () failed_XSERVTransMakeAllCOTSServerListeners: server already runningFatal server error: Cannot establish any listening sockets-Make sure an X server isn't already restart :... socketCreateListener () Listener: server already runningFatal server error: Cannot establish any listening sockets-Make sure an X server isn' t already running [failed] execution: the setup command has no required options; the following is an error message about the problem and solution encountered when VNCServer was installed on April 9, October 21, 2014: [root @ hn] # service vncserver restart disable VNC Server: [OK] Starting VNC Server: 1: root Warning: hn. kd. ny. adsl: 1 is taken because of/tmp /. x1-lockRemove this file if there is no X server hn. kd. ny. adsl: 1A VNC server is already running as: 1 [failed] [root @ hn] # find-name hn. kd. my. ads1: 1 [root @ hn] # rm-rf/tmp /. x1-lock [root @ hn] # [root @ hn] # [root @ hn] # service vncserver restart disable VNC Server: [OK] Starting VNC Server: 1: root Warning: hn. kd. ny. adsl: 1 is taken because of/tmp /. x11-unix/X1Remove this file if there is no X server hn. kd. ny. adsl: 1A VNC server is already running as: 1 [failed] [root @ hn] # rm-rf/tmp /. x11-unix/X1 [root @ hn] # service vncserver restart disable VNC Server: [OK] Starting VNC Server: 1: root WARNING: The first attempt to start Xvnc failed, possibly because the fontcatalog is not properly configured. attempting to determine an appropriatefont path for this system and restart Xvnc using that font path... cocould not start Xvnc. _ XSERVTransSocketUNIXCreateListener :... socketCreateListener () failed_XSERVTransMakeAllCOTSServerListeners: server already runningFatal server error: Cannot establish any listening sockets-Make sure an X server isn't already restart :... socketCreateListener () Listener: server already runningFatal server error: Cannot establish any listening sockets-Make sure an X server isn' t already running [failed] [root @ hn] # solution: [root @ hn] # init 3 [root @ hn] # service vncserver restart disable VNC Server: [OK] Starting VNC Server: 1: root New 'hn. kd. ny. adsl: 1 (root) 'desktop is hn. kd. ny. adsl: 1 Creating default startup script/root /. vnc/xstartupStarting applications specified in/root /. vnc/xstartupLog file is/root /. vnc/hn. kd. ny. adsl: 1.log [OK] [root @ hn] #
How to download the installation file of the VNC Server from the official website? How to Use the VNC Viewer to connect to a remote CentOS Server?
What is the difference between setting Remote Desktop preferences in CentOS and enabling VNC Server?
It is actually the same method,
The default port 0 is used to enable the Remote Desktop preference.
You can enter the IP Address: 0 to test.
In windows, how does one remotely connect to the linux system desktop through vnc?
1. Installation graphical interface:
1) install the logon MANAGER: $ sudo apt-get install TPD
2) install the desktop environment and install only the most basic components: $ sudo apt-get install gnome-core (after installation, you can use the startx command to start the GUI)
3) install the graphic interface (automatically install the application): $ sudo apt-get install ubuntu-desktop (restart the system after installation)
2. Install vnc server (VNC server) in ubuntu ):
$ Sudo apt-get install vnc4server
3 Start the VNC service: $ vncserver: 1 (Number 1 indicates the desktop number)
Run the following command to connect to the ubuntu server at the same time: $ vncserver-geometry 1280 × 800-alwaysshared: 1 (-geometry 1280 × 800 indicates the resolution, -alwaysshared indicates that multiple users can connect to the same desktop at the same time)
Stop the VNC service: $ vncserver-kill: 1
4. In the ubuntuc server graphical interface, set the allowed end-range Logon:
System> Preferences> Remote Desktop:
After setting the password, you can remotely connect to ubuntu server through vnc viewer on the windows client!