VNC server is a used to share desktop with
remote computer.VNC SERVER allows users to run separate sessions in parallel on a machine which can then be accessed by any number of clients from anywhere.
- First we are going to install vnc server.
[root@localhost ~]# yum install vnc* Loaded plugins: rhnplugin, security Repository 'a' is missing name in configuration, using id This system is not registered with RHN. RHN support will be disabled. Setting up Install Process Package vnc-server-4.1.2-14.el5_3.1.i386 already installed and latest version Resolving Dependencies --> Running transaction check ---> Package vnc.i386 0:4.1.2-14.el5_3.1 set to be updated --> Finished Dependency Resolution Dependencies Resolved ============================================================================================================== Package Arch Version Repository Size ============================================================================================================== Installing: vnc i386 4.1.2-14.el5_3.1 a 159 k Transaction Summary ============================================================================================================== Install 1 Package(s) Update 0 Package(s) Remove 0 Package(s) Total download size: 159 k Is this ok [y/N]: y
- It will calculate file size ask whether you want to download it or not. Type y and hit enter.
Downloading Packages: Running rpm_check_debug Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Installing : vnc 1/1 Installed: vnc.i386 0:4.1.2-14.el5_3.1 Complete!
- After the package is installed , start the vnc server service.
[root@localhost ~]# service vncserver restart Shutting down VNC server: [ OK ] Starting VNC server: no displays configured [ OK ]
- Check you firewall is on or not .
[root@dhcppc6 ~]# iptables -L Chain INPUT (policy ACCEPT) target prot opt source destination RH-Firewall-1-INPUT all -- anywhere anywhere Chain FORWARD (policy ACCEPT) target prot opt source destination RH-Firewall-1-INPUT all -- anywhere anywhere Chain OUTPUT (policy ACCEPT) target prot opt source destination Chain RH-Firewall-1-INPUT (2 references) target prot opt source destination ACCEPT all -- anywhere anywhere ACCEPT icmp -- anywhere anywhere icmp any ACCEPT esp -- anywhere anywhere ACCEPT ah -- anywhere anywhere ACCEPT udp -- anywhere 188.8.131.52 udp dpt:mdns ACCEPT udp -- anywhere anywhere udp dpt:ipp ACCEPT tcp -- anywhere anywhere tcp dpt:ipp ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:ssh REJECT all -- anywhere anywhere reject-with icmp-host-prohibited
- If you see word ACCEPT it means firewall is enabled. Now we have to disable firewall and security enhance settings .
[root@dhcppc6 ~]# iptables -F [root@dhcppc6 ~]# setenforce 0
- Now in admin machine go to System option > Preferences> Remote Desktop.
- Then Remote Desktop dialog box will appear on your screen . In this dialog box you will find “Allow other users to view your desktop” option this will allow admin to remotely show client admin’s activity on desktop. Another “Allow other users to control your desktop ” option is for client , if client wants to operate too .
NOW COMES THE CLIENT ROLE
- In client linux machine .
- Open terminal and type vncviewer.
- Then it will ask you to which vnc server you wanna connect . Give IP address of admin machine . And press OK button .
- Admin will receive request that client of this ip address wanna connect to your server.
- Click ALLOW button if that’s your client ip address.
- After clicking Allow button Admin will share his Desktop to Client . Now all the actions done on Admin desktop can be seen by Client connected through vnc server.
- You can also give password to secure your vnc server line . Tick on the “Require the user to enter this password” option and set password .
- So when client try to write ip address of the admin in vnc authentication he also have to give password set by the admin .
- After giving right ip address and password of the admin, Admin will receive request to accept client whether to share your desktop through vnc server or not. CLick on Allow to share your desktop.
This is how you share desktop remotely from linux machine to another linux machine .
NOW IF YOU WANNA SHARE LINUX DESKTOP TO WINDOWS OR MAC MACHINE THROUGH VNC SERVER
Follow these steps:
- SERVER PROCEDURE IS SAME . These steps is for client .
- Download vnc viewer for Windows OR MAC
- Get the ip address of LINUX MACHINE , which is our server machine by ipconfig command .
- After software is downloaded launch it . Type the ip address of server machine in url box .
- It will connect to LINUX server machine and ask for password if you have given any in linux machine .Click on continue .
- Then LINUX SERVER ‘s desktop is on your Windows or Mac .
- Whatever actions happen on LINUX server machine can be seen by client (Windows or MAC)
NOW IF YOU WANT TO SHARE YOUR LINUX SERVER DESKTOP REMOTELY TO ANDROID , IPAD OR IPHONE THROUGH VNC SERVER .
- Server procedure is same .These steps is for client .
- Download this app VNC viewer .
- After its installed ,launch it . This type of screen you will find on your respective device . CLick + Button on your bottom right side to establish connection .
- Then provide ip address of the Linux server machine . Name is not that important .
- After providing ip address tap on create .
- It will create profile for that ip address .Then tap on CONNECT .
- If server has given any password it will show encrypted connection and you have to give password for connection . or IF its showing unencrypted connection just tap on ok.
- Give password if its encrypted connection and tap on continue after giving password .
- Request will be sent to Server machine . Click on allow to remotely share your desktop to ANDROID , IPAD or IPHONE .
- Both client (IPHONE , IPAD , ANDROID ) and LINUX server share screen remotely through VNC server .
Hope you like the post . Comment if you have any problem .