Install and configure VNCServer in Ubuntu

Source: Internet
Author: User

Install and configure VNCServer in Ubuntu

Install VNCServer
Use ssh to log on to Ubuntu and run the following command:

# Sudo apt-get install vnc4server

Disable the Remote Desktop of the original Ubuntu Server
You can first use VNCViewer to connect to Ubuntu, and then remove the first check box under System> Preferences> Remote Desktop. At this time, your VNCViewer will be automatically disconnected.

Configure VNCServer
Log on to the ssh command line and run the following command. Do not add sudo

# Vncpasswd

This command sets the Remote Desktop password for the current user. The. vnc folder is generated in the current user's home directory. after entering the. vnc file, modify the xstartup file:
Vim. vnc/xstartup (Suppose you are in the user root directory at this time)
Comment out twm & (add a # At the beginning of the line), add a gnome-session at the end of the file, save and exit.

Start VNCServer

# Vncserver (-geometry 1440x900) (-alwaysshared) (-depth 16): 1

You can write this command as a shell script in the home directory of the current user.
The depth is between 2 and 32. The larger the value, the better the display, but more resource consumption.

Use VNCViewer to connect to this remote desktop
In VNCViewer, enter the ip address and the desktop number, that is, X. X. X: 1, to connect to the Remote Desktop. The password is the previously set password.
Note: To disable a remote desktop, run the following command:

# Vncserver-kill: 1

": 1" indicates the desktop number when the Remote Desktop is created, that is, port 5901.

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.