2.5 VNC easy connection to Linux Remote Desktop

Source: Internet
Author: User
Tags iptables

To connect to the Linux desktop, VNC connects to the Linux Remote Desktop and, following the steps below, it is very simple, fast, and Linux configures VNC (for example, Redhat, CentOS, Fedora Series).

Linux Platform Installation Vncserver

Windows platform uses Vnc-viewer

Method/Step

1, install Vncserver Server software package on Linux platform.

#yum-y Install VNC *vnc-server*

2. Modify the Vncserver master configuration file

#vim/etc/sysconfig/vncservers

Copy the last two lines and remove the line header comment, and then change to

Vncservers= "1:root"

vncserverargs[1]= "-geometry 1024x768"

3. Set Vncserver remote connection password

#vncpasswd

Enter the same password two times (to connect to the Remote Desktop)

4. Start Vncserver Service

#/etc/init.d/vncserver start

Chkconfig vncserver on//boot up

5, the previous step is completed in the root host directory generated. The hidden directory at the beginning of VNC, which is the root user's VNC desktop configuration file. Open Xstartup Configure desktop

#vim/root/.vnc/xstartup

Change the last line to

Gnome &//(using GNOME Desktop)

6. Open Firewall Vncserver port

#vim/etc/sysconfig/iptables

Add a line under "-A input-m State--state new-m tcp-p TCP--dport 22-j ACCEPT"

-A input-m state--state new-m tcp-p TCP--dport 5901-j ACCEPT

Restart Iptables Service

#/etc/init.d/iptables restart

7, open http://www.realvnc.com/under the Windows client, download the corresponding Platform Vnc-viewer client (the file is green software, no need to install),

In the VNC server column, enter

Xxxxip:1 Click Connect and enter the password in the 3rd step to connect to the Remote Desktop in the small pop-up window.

*************************************************************************************************************** ***********

Xmanager is an easy-to-use, high-performance x-server software that runs on the Windows platform, while GNOME and KDE are X-client,linux x-server. It can seamlessly strip the remote Unix/linux desktop to your windows, even when your computer is in the intranet or behind a firewall, and you can safely run the remote x application via the SSH protocol. Features include:

(1) Multiple Xmanager settings can be set by Xcongfig tool, (2) Support multi-user Windows Terminal environment, (3) support multiple IP addresses, (4) Support local resource database, (5) Convert keyboard mapping by hotkey; (6) Support the Windows printing function under multi-window.

The principle of Xmanager is: X-window does not stipulate that x-server and x-client must work on the same computer, so x-server can work on different computers, and Xmanager is the X-server under the Windows platform. Xmanager and X-client are connected with the XDMCP protocol, the Linux side of the response by the display manager (also known as the login manager, GNOME's display manager for the GDM,KDE display manager for KDM, and also XDm, WDM, etc.) management, So the Linux side must start the Display manager (start Gnome or KDE). For X-window's principles and details, please Google yourself.

One, the configuration of the Linux side:

Start the display manager after booting. Open the/etc/inittab file, change RunLevel to 5, or modify to Id:5:initdefault: if it turns out to be 5, do not modify it.

The display manager of the system is managed by the Displaymanager file, where only the display manager is started after the boot is determined.

Second, the configuration on the CentOS 6 (for Linux with the default graphical environment for GNOME):

1, configure GDM.

The default graphics environment for CentOS 6 is gnome, only GDM is installed, and CentOS 6 KDE uses GDM instead of KDM, so CentOS 6 only needs to configure GDM.

Method 1: Edit the/etc/gdm/custom.conf and add the following:

[Daemon]

Remotegreeter=/usr/libexec/gdmgreeter//Note: "Telnet interface with the same as the local login interface" function, without this and [greeter] entries, the login interface is simple type

[Security]

Allowremoteroot=true//Note: Allow root users to log in remotely

[XDMCP]

Enable=true//Note: Allow Telnet locally, XDMCP default port 177, not shown here to join port=177

[Greeter]

Browser=true//Note: The Telnet interface is "The simple theme of taking the lead like a browser", if the [daemon] item is defined, the bank does not work

Method 2: Open the graphical interface by running Gdmsetup in the terminal or by tapping the "login screen" in the menu.

Note: You can adjust both "remote" and "secure".

Third, the configuration on OpenSUSE 11 (for Linux with the default graphics environment for KDE):

1, configuration KDM.

The default graphics environment for OpenSUSE 11 is KDE, although GDM and KDM can be installed at the same time, but only KDM is started by default. So openSUSE 11 only needs to configure KDM, if you start GDM to replace KDM, then the configuration can refer to CentOS 6.

Modify/etc/x11/xdm/xaccess,

Remove the #* #any host can get a login window at the beginning of the line,

Become * #any host can get a login window

Note: The OpenSUSE 11 default has been removed #.

Modify the last line of/etc/x11/xdm/xdm-config, and add one in front of displaymanager.requestport:0! Comment out the line.

Modify the/etc/sysconfig/displaymanager file to change the following:

displaymanager_remote_access= "Yes"//NOTE: Allow Remote Desktop Connection

Displaymanager_root_login_remote= "Yes"//Note: Allow ROOT user to connect remotely

Four, restart the service:

1. Open the UDP 177 port in the firewall. If you have disabled the firewall, you can skip this entry.

Method 1 (for terminal): In the/etc/sysconfig/iptables file, add:

-A rh-firewall-1-input-m state--state new-m udp-p UDP--dport 177-j ACCEPT

Method 2 (for X-window): Add the UDP 177 port in the additional ports under Firewall options in system, management, security level and firewall.

You can either choose one of the two methods.

2, before the commencement of the process must be restarted, the first, the direct restart of the Linux system, the second, restart the display manager Gdm-restart (GDM only), restart the Firewall service iptables restart. If both GNOME and KDE are installed, you can select one of the environments in the session after Telnet.

V. Settings on Windows:

Download Xmanager 5 in the Windows system, then install, open Xbrowser, you can see Linux on your LAN, if it is Linux on the WAN, you can create a new XDM direct connection. Double-click to open, enter the Linux Administrator account password. Also for security reasons, XDMCP can run on SSH and choose the Secure XDMCP method.

Its effect is the same as the Linux native display.

Vi.. Disadvantages:

The disadvantage of this scenario is also obvious, X-window is the best possible display scheme, it does not have the ability to adjust according to the network bandwidth, so it will occupy as much bandwidth as possible.

2.5 VNC easy connection to Linux Remote Desktop

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.