Rhel 5.x,6.x VNC Service installation, configuration and use

Source: Internet
Author: User

The VNC server is configured below to enable users (root) to connect remotely to the Linux system's graphical interface via VNC clients (provided your server installs the desktop)
1. Check to see if the Linux system has VNC installed
Rpm-q Vnc-server

"Package Vnc-server is not installed" shows that the VNC server was not installed
If you do not install VNC using the following command

Yum Install Vnc-server

2. Start VNC Service

Vncserver

You'll require a password to access yourdesktops.

Password:

Verify:

Prompts for the password, which is the password required for remote login, enter the password, return

4, switch to root account: Su root and then enter the password of the root account

Vim/etc/sysconfig/vncservers #vnc配置文件

Remove the following two lines of comments.

Vncservers= "1:root" # 1:root (Desktop number: User), configure startup desktop

vncserverargs[2]= "-geometry 1204x768-nolisten tcp-localhost"

800x600 represents the resolution of the desktop

Last Saved exit

5. Restart VNC server

Method One: Etc/init.d/vncserver restart

Method Two: Service Vncserver restart

6, set up VNC server automatically start
Vi/etc/rc.local

Add the following to the file

/etc/init.d/vncserverstart

7, change VNC connection password
vncpasswd


8. Connect Remote Desktop


Use SECURECRT to connect to the target machine.

Execute the iptables–f command,

You can then connect using the VNC viewer

After the remote Desktop is accepted, the reboot firewall will allow the remote VNC connection to be made.

Note: If a gray screen appears after the connection, you can set the following method

Enter User's home directory

Cd/home/user

If you are logged in with the root account, the current directory is the user's root directory.

CD ~/.vnc
VI Xstartup #编辑

#twm & #注释掉这一行

Gnome-session & #添加这一行

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.