Wednesday, March 4, 2009

How to get GUI from windows to linux/Unix computer

You can connect to linux computer from windows computer using telnet, ssh shell or putty software. After connecting to linux computer you only get text based user interface. You can't get graphical user interface through these software. But sometimes you want to get GUI on your linux machine remotely connecting from windows machine and vice-versa. For example, you want to run Oracle Universal Installer GUI window or you want to run dbca GUI interface. With vncviewer and vncserver software you can achieve your goal.

Download both vncserver and vncviewer from the link http://www.realvnc.com/cgi-bin/download.cgi. For unix computer(where you like to display GUI window) download the VNC Enterprise Edition which includes vnc viewer, XFree86 module, stand-alone server and x0vncserver.

For windows computer (from where you connect to unix machine) download Stand-alone Viewer.

Similarly if you want to get GUI connecting from unix to windows computer download vnc server for windows and vnc viewer from unix machine.

I downloaded vnc Enterprise Edition (server one) for Linux machine and vnc Enterprise Edition Viewer for windows machine. I downloaded the GZipped Tarfile for unix and Executable file for windows machine.

On unix, first gunzip then untar and run vncserver.
[root@localhost tmp]# ls
vnc-4_1_3-x86_linux.tar.gz
[root@localhost tmp]# gunzip vnc-4_1_3-x86_linux.tar.gz
[root@localhost tmp]# ls

vnc-4_1_3-x86_linux.tar
[root@localhost tmp]# tar -xvf vnc-4_1_3-x86_linux.tar
[root@localhost tmp]# cd vnc-4_1_3-x86_linux

[root@localhost vnc-4_1_3-x86_linux]# ls
java vncconfig.man vncserver vncviewer.man Xvnc.man
LICENCE.txt vncinstall vncserver.man x0vncserver
README vncpasswd vnc.so x0vncserver.man
vncconfig vncpasswd.man vncviewer Xvnc
[root@localhost vnc-4_1_3-x86_linux]# vncserver

You will require a password to access your desktops.

Password:
Verify:

New 'localhost.localdomain:1 (root)' desktop is localhost.localdomain:1

Creating default startup script /root/.vnc/xstartup
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/localhost.localdomain:1.log

While prompt password give at least 6 digits password. Check vncserver script and by default port is 5901 for localhost.localdomain:1 and 5902 is for localhost.localdomain:2.

Now from windows computer, run Vncviewer Listener and then give password for vncserver and port. Then you will be able to run GUI inside your vnc viewer.

Related Documents
How to change/configure IP Address on Linux/ Fedora /Ubuntu
Copy files between Unix and Windows with rcp
Screen -A very useful unix tool to work with remote system
Different ways to take Screenshot on Linux
How to change the hostname in Linux
Memory Usage of Solaris Operating System

No comments:

Post a Comment