Configuring the VNC Service

Source: Internet
Author: User

Content Introduction:

VNC (Virtual network Computing) is an abbreviation for a fictitious networked computer, and is an excellent remote control tool software developed by the well-known European research Laboratory at/T.

The following describes the "Red Flag Linux DC Server 5.0" and "Red Flag Linux Desktop 6.0" operating system, the configuration of the VNC service, to enable clients to "Remote Desktop" mode of connection access.


One, Red Flag Linux DC Server 5.0 provides Remote Desktop services:


Server: Redflag Linux DC Server 5.0

Description: Redflag Linux DC Server 5.0 has its own RPM package with VNC server installed. No separate installation is required.


The configuration and operation are as follows:


1. Configure VNC Server


Edit the Vncservers file under/etc/sysconfig/to add the VNC user.


At the end of the Vncservers file, add the following line:

-------------

Vncservers= "1:root"

--------------

Attention:

*. The user added (here is root user root) requires that the user already exists.


*. "1" is the session number. You can add multiple sessions to provide multiple Remote Desktop services at the same time.


2. Configure the VNC server password

Run command: #vncpasswd, set the password for the VNC login.


After the password is set, a file named "passwd" is generated under path/root/.vnc/.


If you want to change the VNC server password, execute the #vncpasswd command again.


3. Start the Vncserver service


Run command: #/etc/init.d/vncserver start


Or: #service vncserver start


After the Vncserver is started, xstartup files and 1.log files are generated under/root/.vnc/.


In the Xstartup file, the main thing is to define how the Remote Desktop that VNC server can see in the client session when it provides the service.


Edits can be made to Xstartup to add custom content.


The 1.log file is a log file for the VNC server with session number "1".


If the VNC server fails to start, you can find the cause based on the log.


4. Modify the VNC service Remote Desktop startup mode


By default, Remote Desktop VNC starts with the Twm window manager (Tabwindow Manager for the X Windowsystem).


The client can see the remote interface (TWM window) is relatively simple, although the system functions can be executed under the command line, but the lack of efficient human-computer interaction function.

If you want VNC server to start the KDE interface service, you need to modify the/root/.vnc/xstartup file.


Here's how to modify it:


Open the/root/.vnc/xstartup file, comment out the last line Twm &, and change the following:


--------------

#twm &
Startkde &

--------------

After you save the Xstartup file and start the Vncserver service again, the client can access the friendly KDE interface.


5. Common commands for VNC server

*. Vncserver Restart Service Command:

#service Vncserver Stop
#service vncserver Start
Or:
#service vncserver Restart


*. To view the Vncserver Service status command:

#service vncserver Status


*. To view the Vncserver service listening Port command:


#netstat-TLNP |grep VNC


By default, VNC server provides a browser-accessible port that is: 5800 + Session number,

The port that provides access via the VNC Viewer client is: 5900+ session number.

If you need to provide a server across firewalls, the firewall needs to open the appropriate port.


*. To end the provide session service command:

#vncserver-kill: Session number
For example: #vncserver-kill:1//end of service with session number 1

6. VNC Client and use:

There are three types of clients to choose from:

A. Client is a Linux environment

Run the following command:

#vncviewer vncserverip:1

Then enter the login password for the VNS server to connect to the VNC server and open and display the Remote Desktop.

The premise is that the client needs to install the VNC client RPM package, which can download and install the package: vnc-4.0-8.1.i386.rpm.

Vncserverip is the IP address of the server, and "1" is the session number.


VNC server is looking for the font path of the X system by default under/usr/x11r6/lib/x11/fonts/.


But Redflag Linux Desktop 6.0, under/usr/x11r6/lib/x11/fonts/, only TrueType this folder.




Installation Services:

Yum Install Tigervnc-server


[Plain] view plaincopy

[Root@localhost ~]# Yum Install Tigervnc-server

Loaded Plugins:fastestmirror, Refresh-packagekit, security

Loading mirror speeds from cached hostfile

* base:mirror.bit.edu.cn

* extras:mirrors.yun-idc.com

* updates:mirrors.yun-idc.com

Setting up Install Process

Resolving Dependencies

--Running Transaction check

---> Package tigervnc-server.x86_64 0:1.1.0-8.el6_5 'll be installed

--Finished Dependency Resolution

Dependencies resolved

=============================================================================================================== ================================================================================

 Package                                             Arch                                       Version                                               Repository                                   Size  

=============================================================================================================== ================================================================================

Installing:

Tigervnc-server x86_64 1.1.0-8.el6_5 Updates 1.1 M

Transaction Summary

=============================================================================================================== ================================================================================

Install 1 package (s)

Total Download size:1.1 M

Installed size:2.9 M

Is this OK [y/n]: Y

Downloading Packages:

tigervnc-server-1.1.0-8.el6_5.x86_64.rpm | 1.1 MB 00:02

Running Rpm_check_debug

Running Transaction Test

Transaction Test Succeeded

Running Transaction <

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.