My Linux is Fedora 13 and the installation method is as follows:
1. Open Terminal, execute
# yum Install-y Tigervnc Tigervnc-server
2. Edit/etc/sysconfi/vncservers
# vi/etc/sysconfig/vncservers
In the end, add:
vncservers= "1:sky" vncserverargs[1]= "-geometry 800x600-nolisten tcp-localhost"
Note: Sky is the name of my machine
Then: Wq Save the exit.
3. Before starting VNC, set up the VNC link password:
# VNCPASSWD
Two times enter the password you want to set.
After that, you can
# Vncserver
The VNC service is started and the remote computer can be linked via the VNC client.
How to link:
IP: Open Window
such as: 192.168.1.102:1
Problems encountered:
1, through the # Ps-ef|grep VNC view has started the VNC service, but the remote computer is not connected, there may be a firewall problem, two solutions:
1), close the firewall,
# Service Iptables Stop
If necessary, you can set the firewall default does not start (because my linux is my office, so I am not used to open the firewall)
# chkconfig Iptables off
2), if you are the server, you have to open the firewall, you can edit the open port of the firewall, join the open port of VNC, the default first window open port is 5901, and then the open window will be on the basis of 5901 to add, if you do not know their open port is how much, you can pass the # Ps-ef|grep VNC See, Take 5901 as an example
# Vi/etc/sysconfig/iptables
Edit the open port of the firewall, insert
-A input-s 203.171.229.198-i eth1-p tcp-m tcp--dport 5901-j ACCEPT
This is my configuration, you can copy the configuration in your iptables file, then change a port number on the line. : Wq save exit.
Perform
# Service Iptables Restart
Restart the firewall so that the settings you just made take effect.
Now the remote computer should be able to connect.
2, some Linux version to start the VNC service, remote connection is a gray screen, the workaround:
# VI ~/.vnc/xstartup
At the end of the
TWM &
Before adding #, comment it out, and then add
Gnome-session &
: Wq save to exit.
And then execute
# Service Vncserver Restart
Reboot.
If not, it may be the time to restart the error, you can
# vncserver-kill:1
Close the 1 window, and then
# Vncserver
Start, perhaps start reporting error, but after prompt, let you delete 3 files, you according to the directory delete, restart can.
"Turn" Linux Learning Path--Start the VNC service