Configure linux Remote Desktop Connection in vnc

Source: Internet
Author: User

1. Configure the VNC Server
Edit the vi/etc/sysconfig/vncservers file and add a VNC user.
Add the following line to the end of the vncservers file:
-------------
VNCSERVERS = "1: root"
--------------
Note:
*. The added user (root User) must already exist.
*. "1" indicates 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 the command: # vncpasswd to set the vnc logon password.
After the password is set, a file named "passwd" is generated under the path/root/. vnc.
If you want to change the VNC Server password, run the # vncpasswd command again.

3. Start the vncserver service
 
# Vncserver (xstartup file is available only after startup)

4. Modify the VNC service Remote Desktop Startup Mode
 
Vi/root/. vnc/xstartup
Comment out the last line of twm & and modify it as follows:
--------------
# Twm &
Startkde &
--------------
Save the file and start the vncserver service again. # service vncserver restart
 
Test connection: IP Address: 1 (for example, 10.160.202.8.0: 1]

5. Common commands of VNC Server
 
*. Vncserver restart command:
# Service vncserver stop
# Service vncserver start
Or:
# Service vncserver restart

*. Command for viewing the vncserver service status:
# Service vncserver status

*. View the vncserver listening port command:
# Netstat-tlnp | grep vnc
 
By default, the VNC Server provides the following port numbers for access through a browser: 5800 + session numbers. The port numbers for access through the VNC Viewer client are 5900 + session numbers.

If you need to provide a cross-firewall server, the firewall needs to open the corresponding port.

*. Run the following command to end the service:
# Vncserver-kill: Session ID
For example: # vncserver-kill: 1 // end the service whose session number is 1

 

This article is from "1"

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.