VNC installation and multi-user configuration under RHEL Linux6.3

Source: Internet
Author: User
Tags i18n


VNC (Virtual network computer) is an abbreviation for a computer that is virtualized. VNC is an excellent remote control tool software developed by the prestigious European Research Laboratory at T. VNC is a free, open source software based on UNIX and Linux operating systems that is powerful, efficient and practical, with performance comparable to any remote control software in Windows and Macs. In Linux, VNC consists of the following four commands: VNCSERVER,VNCVIEWER,VNCPASSWD, and Vncconnect. In most cases, users only need two of these commands: Vncserver and Vncviewer. Let's talk about VNC installation and multi-user configuration under Rhel Linux6.3.


I. Installation of VNC


The RPM packages for VNC in RHEL6.3 are:


Client: tigervnc-1.0.90-0.17.20110314svn4359.el6.x86_64.rpm

Service side: tigervnc-server-1.0.90-0.17.20110314svn4359.el6.x86_64.rpm


1. Yum Installation: (configure local Yum source)

[email protected] yum.repos.d]# cat Rhel6.repo

[Rhel6]

name=red Hat Enterprise Linux6.3

Baseurl=file:///rhel6

Enabled=1

Gpgcheck=0


[Email protected] oracle]# yum-y install Tigervnc-server

Loaded Plugins:product-id, Refresh-packagekit, security, Subscription-manager

Installing:tigervnc-server-1.0.90-0.17.20110314svn4359.el6.x86_64 1/1

Installed products updated.

Verifying:tigervnc-server-1.0.90-0.17.20110314svn4359.el6.x86_64 1/1


Installed:

Tigervnc-server.x86_64 0:1.0.90-0.17.20110314svn4359.el6

complete!


2. Start the VNC service


#service vncserver Start


3. Add System Boot


#chkconfig Vncserver on

4. Start the VNC desktop


[Email protected] oracle]# Vncserver


You'll require a password to access your desktops.


Password:

Verify:

Xauth:creating new Authority file/root/. Xauthority


New ' Rac1.localdomain:1 (root) ' Desktop is Rac1.localdomain:1


Creating default startup Script/root/.vnc/xstartup

Starting applications specified In/root/.vnc/xstartup

Log file Is/root/.vnc/rac1.localdomain:1.log


Note: The first time you start the system will be prompted to set the login password when connecting to VNC, this and root set authentication password can be different.


Ii. Configuration of VNC

Viewing the VNC desktop configuration file


[Email protected] ~]# Vi/root/.vnc/xstartup


#######################################################################


1 #!/bin/sh

2

3 [-r/etc/sysconfig/i18n] &&. /etc/sysconfig/i18n

4 Export LANG

5 Export Sysfont

6 Vncconfig-iconic &

7 unset Session_manager

8 unset dbus_session_bus_address

9 os= ' Uname-s '

if [$OS = ' Linux ']; Then

"$WINDOWMANAGER" in

*gnome*)

if [-e/etc/suse-release]; Then

Path= $PATH:/opt/gnome/bin

Export PATH

+ fi

17;;

Esac

Fi

if [-X/ETC/X11/XINIT/XINITRC]; Then

Exec/etc/x11/xinit/xinitrc

Fi

if [-F/ETC/X11/XINIT/XINITRC]; Then

EXEC sh/etc/x11/xinit/xinitrc

Fi

[-R $HOME/. Xresources] && Xrdb $HOME/. Xresources

Xsetroot-solid Grey

Xterm-geometry 80x24+10+10-ls-title "$VNCDESKTOP Desktop" &

TWM &

######################################################################################


Note: The 1-29 on the left is the line number displayed by Vim for easy editing.


Lines 7th and 21st or 24 are commented out by default in Red Hat version 5, which is to be enabled, RHEL6.3 is enabled by default.

Just take the last sentence Twm & change to Gnome-session &.

Then Vncserver-kill:1

Again vncserver:1 enabled, you can use the client to connect properly. (Note: You need to close the firewall or release the appropriate port)


Three, multi-user Configuration

Modifying the Vncserver configuration file


[Email protected] ~]# vi/etc/sysconfig/vncservers


#####################################################################################

1 # The Vncservers variable is a list of display:user pairs.

2 #

3 # Uncomment the lines below to start a VNC server on Display:2

4 # as my ' myusername ' (adjust this to your own). You'll also

5 # need to set a VNC password; Run ' man vncpasswd ' to see how

6 # to does that.

7 #

8 # do not RUN the this SERVICE if your the local area network is

9 # untrusted! For a secure-to-a-to-a using VNC, see this URL:

Ten # http://kbase.redhat.com/faq/docs/DOC-7028

11

"-nolisten TCP" to prevent X connections to your VNC server via TC P.

13

"-localhost" to prevent remote VNC clients connecting except when

# Doing so through a secure tunnel. See the '-via ' option in the

# ' Man vncviewer ' manual page.

17

#VNCSERVERS = "2:myusername"

#VNCSERVERARGS [2]= "-geometry 800x600-nolisten tcp-localhost"

##########################################################################################


Note: Copy 18, 19 lines, make the following changes

vncservers= "1:root 2:test"

vncserverargs[3]= "-geometry 800x600-nolisten tcp-localhost"

If you enable more users, you can directly space to continue to add the user, example, vncservers= "1:root 2:test 3:user" but the 19th line of [3], must be changed to the 18th line to enable the number of users plus 1, such as the above two users, will be written 3, Then 3 users are written in 4. Otherwise, after Vncserver restarts, the last user's VNC desktop is not available, but if the above user has another desktop number enabled but not written into this file, it is not affected. In addition, the test user also needs to enable the Vncserver service and set the password to modify the corresponding configuration file.


Restart VNC Service


# Service Vncserver Restart


Shutting down the firewall


#service iptables Stop

#chkconfig iptables off


Multi-User testing:


When using a VNC client connection in a Windows system environment, be sure to keep up with the desktop number when entering the IP address, for example: "192.168.199.109:1" "192.168.199.109:2". This allows you to log on to the root desktop and the test user desktop separately.

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/47/0F/wKiom1P2EPyA15P3AAJnLRvyioc520.jpg "title=" aa.jpg "alt=" Wkiom1p2epya15p3aajnlrvyioc520.jpg "/>

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/47/11/wKioL1P2EjvSzUmwAAIkP3rY0ik640.jpg "title=" bb.jpg "alt=" Wkiol1p2ejvszumwaaikp3ry0ik640.jpg "/>


Add:

Remote access to UNIX, Linux, and the graphical operation of the popular Xmanager software, VNC compared to it-the two work principle is not the same, the former (VNC) is a remote connection to the operating system, all operations on the UNIX, Linux host server, even during the operation " The local computer is disconnected from the operations host network "and does not affect the smooth operation of the operations, and the latter (Xmanager) is through the port to boot the host server UI interface to the local computer for presentation, such as" Local computer and Operation host Network disconnect ", operation will be interrupted failure! If the tasks in the operation are very important and cannot be interrupted, such as the Oracle RAC implementation, the results are catastrophic! More importantly, VNC is free, open source, xmanager you may use to crack the registered version.

This article is from the "Hollows Jie Sun" blog, be sure to keep this source http://xjsunjie.blog.51cto.com/999372/1543336

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.