Redhat 5.5 VNC

Source: Internet
Author: User
Tags iptables

The general VNC configuration is described first:

1. Enter the home directory as per user (for example,/HOME/SWJ) execute mkdir. VNC, create a folder

2. Enter the folder, execute the vncserver command to open VNC service, the first prompt to enter a password and confirm that there will be a number (such as 1,2, etc.), to remember

3. VI xstartup modify files, remove

#unsetSESSION_MANAGER

#exec/ETC/X11/XINIT/XINITRC

The # Number of the first two lines and change the last line of TWM to Gnome-session (if it is a KDE desktop, change to Startkde)

4. Repeat the above steps until all users have been added

5. modify file/etc/sysconfig/vncservers as root, find #vncservers= "1:myusername", remove the front #, or rewrite a line, change to: vncservers= "1:SWJ 2:JT 3: Hsz "

6. Execute command/etc/init.d/vncserver restart restart VNC service

7. If you start the service every time, please check vncserver in the boot service

8. And most importantly, the most important element of what is said today. The server installed Su, environment variables in the/etc/profile set, can only wait to record the desktop, see the icon, and then found that the problem is here. Change the environment variable to the/ETC/BASHRC setting. And then it's OK, it's amazing .


4. Edit/etc/sysconfig/vncservers, add the following line: vncservers= "3:root"
vncserverargs[3]= "-geometry 1024x700-depth 16 "3 represents port 5903, which is the port on which the Vncserver listens (the default is 5900), and the client needs to take this port number to access the server side. The resolution of the
1024x700 client using Vncviewer access. 5.chkconfig Vncserver on
Set the Vncserver service to boot automatically at run level 3 and 5.   6. Use the VNC Viewer to connect to the server side. Note that this Client Access server requires port access, such as the VNC server side of the IP address is 10.10.10.10, according to the above configuration, the client uses the VNC viewer should enter the address is "10.10.10.10:5903." If you open iptables you need to add the rule to the firewall  iptables-i rh-firewall-1-input-m state--state new-p TCP
--destination-port 5901-j ACCEPT

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.