Install VNC server on the remote system to which we want to log in on via remote desktop
As soon as the installation is finished, make a backup of the VNC server configuration file located in /etc/sysconfig/vncservers.
Open VNC server configuration file located with your desired editor.
Read the instructions in this file. Have a look at the commented example at the end of the configuration file.
- Edit configuration xstartup file
- Comment "vncconfig -iconic &" line with "#" symbol, so the result will looks like this
You should see following output
Or start the application from menu "Applications" > "Internet" > "TigerVNC Viewer". Following window will pop up
yum -y install tigervnc-server
As soon as the installation is finished, make a backup of the VNC server configuration file located in /etc/sysconfig/vncservers.
cp /etc/sysconfig/vncservers /etc/sysconfig/vncservers.backup
Open VNC server configuration file located with your desired editor.
vi /etc/sysconfig/vncservers
Read the instructions in this file. Have a look at the commented example at the end of the configuration file.
# VNCSERVERS="2:myusername"
# VNCSERVERARGS[2]="-geometry 800x600 -nolisten tcp -localhost"
VNCSERVERS="1:root" VNCSERVERARGS[1]="-geometry 1440x900 -nolisten tcp -localhost"
Create VNC passwords for your user. Log in as the user (zdenek in my example) and type command
vncpasswd
Go to user's .vnc directory on VNC server
cd ~/.vnc
vi xstartup
#vncconfig -iconic &
Go to the end of the file, comment line with "twm &" and add "startx &" to initiate Gnome or "startkde &" for KDE environment initialization. The final result fill be following:
for Gnome
for Gnome
#twm &
startx &
Start VNC server
service vncserver restart
You should see following output
[root@NaN NaN]# service vncserver start Starting VNC server: 1:root [ OK ]
Add the VNC tcp,udp port Number in firewall
Finally The VNC tcp,udp port number will add in others port number in firewall
Open vnc viewer on your client - execute command
vncviewer
Type there the IP address of the localhost (127.0.0.1) and port number of your desktop behind the colon (Do not use the public / private IP address of your VNC server because it will not work; use only localhost). In general, use 127.0.0.1:N, where N is number of the assigned desktop. In my case it is the desktop number 1. Click OK button. You will be asked for password. Type the one you have set up in the step 6 above and enter the return key.
A window with remote desktop will appear.
No comments:
Post a Comment