Windows Remote Desktop Management CentOS 6.4

Source: Internet
Author: User
Tags windows remote desktop

Windows Remote Desktop Management CentOS 6.4

1. Install tigervncserver in CentOS
 
System-> Administration-> Add/Remove Software
 
Search for vnc and install tigervnc-server, libvncserver, and tigervnc
 
2. Configure vncservers. Assume that you have two users who want to log on remotely. The user names are user1 and user2.
 
# Gedit/etc/sysconf/vncservers
 
Add at the end of this file
 
VNCSERVERS = "1: user1 2: user2"
VNCSERVERARGS [1] = "-geometry 1440 × 900"
VNCSERVERARGS [2] = "-geometry 1440 × 900"
 
If you have more users who want to log on remotely, you have to add 3: user3 in the vncservers line. The following VNCSERVERARGS is the parameter corresponding to the remote login of the I-th user. There are many other options for this parameter, which is of little significance to me. So I set the resolution. You can change 1440x900 to the resolution you want based on your needs, the default value is 800x600 ~
 
3. Generate xstartup + and set vncpasswd. Xstartup does not exist when the installation is complete. This file is automatically generated when the vncserver runs for the first time.

// Switch user [* @ * ~] $ Su-user1
Passwd: // set vncpasswd. When you use a vnc connection, enter the password when prompted, instead of the user1 password in the system.
[User1 @ * ~] $ Vncpasswd
Passwd:
Verify: // start vncserver and generate xstartup [user1 @ * ~] $ Vncserver
New '*: 1 (user1)' desktop is *: 1
 
Starting applications specified in/root/. vnc/xstartup
Log file is/root/. vnc/*: 1.log
 
[User1 @ * ~] $

For example, we want two users, user1 and user2, to log on remotely. Therefore, the same Command needs to be used once with user2.

// Switch user
[* @ * ~] $ Su-user2
Passwd:
// Set vncpasswd. When you use a vnc connection, you enter the password when prompted, instead of the user1 password in the system.
[User2 @ * ~] $ Vncpasswd
Passwd:
Verify:
// Start vncserver and generate xstartup
[User2 @ * ~] $ Vncserver
 
New '*: 2 (user2)' desktop is *: 2
 
Starting applications specified in/root/. vnc/xstartup
Log file is/root/. vnc/*: 2.log
 
[User2 @ * ~] $
 
If you still have more users who need to log on remotely, I don't know how to do it. Come on one by one ~~ Note: When starting vncserver, each user above will receive a prompt "New" *: 2 (user2) 'desktop is *: 2 ", which is very important! The data 2 is the desktop number, which means that the desktop Number of user2 is 2. The desktop number of a specific user may change every time the vncserver is started, remember your desktop number and use it later
 
4. Stop vncserver
 
[* @ * ~] $ Su-root
Passwd:
[Root @ * ~] # Service vncserver stop

5. Modify xstartup
 
[* @ * ~] $ Su-root
Passwd:
[Root @ * ~] # Gedit/home/user1/. vnc/xstartup
[Root @ * ~] # Gedit/home/user2/. vnc/xstartup
[Root @ * ~] #
 

Add comments to the last two lines and a line. The last two lines of the original text are as follows:
 
Xterm-geometry 80 × 24 + 10 + 10-ls-title "$ VNCDESKTOP Desktop" &
Twm &

After modification
 
# Xterm-geometry 80x24 + 10 + 10-ls-title "$ VNCDESKTOP Desktop" &
# Twm &
Gnome-session &

6. Start vncserver
 
[* @ * ~] $ Su-root
Passwd:
[Root @ * ~] # Service vncserver start

Use this command to start a remote desktop for each user you have added. Remember your desktop number!
 
7. Disable Firewall
 
[* @ * ~] $ Su-root
Passwd:
[Root @ * ~] # Service iptables stop

I just close the firewall. If you need to use the firewall, you need to set up a firewall so that the vncserver can communicate with each other. Otherwise, the firewall cannot be connected.
 
Note: The firewall is temporarily disabled. The firewall is started again when the system starts again! To permanently disable the firewall, run the following command to disable the firewall.
 
[* @ * ~] $ Su-root
Passwd:
[Root @ * ~] # Chkconfig iptables off

If you do not want to disable the firewall, you must set an exception rule in the firewall to open the 5901-590x port.
 
The specific rules are written. We recommend that you do not search on the Internet, but use the "man iptables" command to view the help document of the firewall. This document is the help document of your system version firewall, the help document for online search may not be a version. For example, the iptables configuration I used to access the Internet is version 1.1.19, while the iptables configuration in my system is version 1.4.7. After reading this article, after adding rules according to instructions, When I restart the firewall, the rules are invalid ~ Because of the different versions, some rules have changed the writing method. This is normal, but most of the rules have not changed.
 
To open a port, first edit the firewall configuration file, which is in/etc/sysconfig/iptables by default. This configuration file is usually told in the help document above, so if you have time, you can see it as a learning tool.
 
[* @ * ~] $ Su-root
Passwd:
[Root @ * ~] # Gedit/etc/sysconfig/iptables
 

Add a row to this file
 
-A input-m state-state NEW-m tcp-p tcp-dport 5901: 5910-j ACCEPT
 

The meaning of this sentence is to set the 5901 ~ Tcp connection of port 5910 is allowed through ~
Note: you cannot add the row to the end of the file. This is basically useless.
 
This file usually contains several rows.
 
-A input-m state-state ESTABLISHED, RELATED-j ACCEPT
-A input-p icmp-j ACCEPT
-A input-I lo-j ACCEPT

Add one line after the three lines.

8. I use tigervnc to install the vnc client in Win 7.
 
Http://sourceforge.net/projects/tigervnc/files/tigervnc/
 
After the installation is complete, start TigerVNC Viewer, for example,

Enter "IP: desktop number" and click "OK" to enter

Enter the password you set using the vncpasswd command to log on to the console ~
 
9. Add vncserver self-starting
 
[* @ * ~] $ Su-root
Passwd:
[Root @ * ~] # Chkconfig vncserver on

Windows Remote Desktop Connection to Ubuntu 14.04

Enable remote desktop logon for Xmanager in CentOS 6.5

Installation and Use of CentOS VNC remote desktop program

Ubuntu tutorial-use TeamViewer to connect to the 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.