How to Access Remote VNC Desktop from Web Browser Using TightVNC Java Viewer

VNC stands for (Virtual Network Computing) is an open source graphical desktop sharing tool for managing and control machines remotely using a VNC client called VNC Viewer. You must install a VNC client on your machine to access remote desktops, but if you don’t want to install a VNC client on your machine and want to access it remotely. How?

In such scenario, what you will do. Well, you can still access VNC using a modern web browsers such as Firefox, Chrome, Netscape etc. But How? let me tell you.

TightVNC a modern and much enhanced desktop sharing program that provides a standard web browser program called TightVNC Java Viewer.

TightVNC Java Viewer a remote control program that written in Java programming language. It connects to any remote VNC enabled box where Java is installed and lets you control and manage with your mouse and keyboard right from the web browser, just like you sitting in front of the computer. It’s an easy and friendly solution for system administrators to manage their remote desktops directly from the web browser without installing any additional software’s.

It requires that the remote machine, must have running VNC Compatible server such as VNC, UltraVNC, TightVNC, etc. But, I recommend you to install a TightVNC Server. Please use the following article that shows how to install TightVNC Server on RHEL, CentOS and Fedora systems.

  1. Install TightVNC Server to Access Remote Desktops

Apart this, you also have running Apache web server along with Java installed on it. Follow the below guide that show you how to install Java in Linux systems.

  1. Install Java in Linux

After installing TightVNC Server and Java, lets proceed further to install web server on it. Use the following “yum command” to install Apache server.

# yum install httpd httpd-devel

Now we have all the needed software’s installed on the system. Let’s move ahead to download and install TightVNC Java Viewer.

Install TightVNC Java Viewer to Access Remote Desktops

Go to TightVNC Download page, to grab the latest code or you may use the following “wget command” to download it.

Go to Apache web root directory (i.e. /var/www/html), create a empty directory “vncweb“. Use “wget” to download the files inside the folder. Extract the files using unzip command and rename viewer-applet-example.html file to index.html as shown.

# cd /var/www/html
# mkdir vncweb
# cd vncweb
# wget http://www.tightvnc.com/download/2.7.2/tvnjviewer-2.7.2-bin.zip
# unzip tvnjviewer-2.7.2-bin.zip 
# mv viewer-applet-example.html index.html

Open index.html file using any editor or nano editor as suggested.

# nano index.html

Next define IP address of Server, VNC Port Number and Password of VNC User that you want to connect. For example, my server IP address is “172.16.25.126“, Port as “5901” and Password as “abc123” for my VNC user called “tecmint“.

<param name="Host" value="172.16.25.126" /> <!-- Host to connect. -->
<param name="Port" value="5901" /> <!-- Port number to connect. -->
<!--param name="Password" value="abc123" /--> <!-- Password to the server. -->

Access VNC Desktop of user “tecmint” from the browser by going to.

http://172.16.25.126/vncweb

You will get a “Security Warning” message says that unsigned application requesting permission to run. Just accept and run the application as described below.

VNC Web Access

Enter Password to access “tecmint” Desktop.

VNC Web Password

Again Enter Password.

VNC Remote Desktop Password

That’s it, you successfully connected to Remote Desktop.

VNC Remote Web Access

If you’re accessing from any other computer, you might get an “missing plugin” error, just install plugin and access it. You can grab the latest Java plugin at Download Java page.

Best Affordable Linux and WordPress Services For Your Business
Outsource Your Linux and WordPress Project and Get it Promptly Completed Remotely and Delivered Online.

If You Appreciate What We Do Here On TecMint, You Should Consider:

  1. Stay Connected to: Twitter | Facebook | Google Plus
  2. Subscribe to our email updates: Sign Up Now
  3. Get your own self-hosted blog with a Free Domain at ($3.45/month).
  4. Become a Supporter - Make a contribution via PayPal
  5. Support us by purchasing our premium books in PDF format.
  6. Support us by taking our online Linux courses

We are thankful for your never ending support.

Ravi Saive

I am Ravi Saive, creator of TecMint. A Computer Geek and Linux Guru who loves to share tricks and tips on Internet. Most Of My Servers runs on Open Source Platform called Linux. Follow Me: Twitter, Facebook and Google+

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

You may also like...

14 Responses

  1. marchioni david says:

    why did not you post ALL the html code ???

  2. David in Munich says:

    Ravi, it seems that neiter Chrome or Firefox support NPAPI plugins (apart from Flasah) any more. Is there a Webstart option instead, otherwise WebVNC is dead (see https://blog.mozilla.org/futurereleases/2015/10/08/npapi-plugins-in-firefox).

    I found the above link after wasting 2 evenings on this unsuccessfully. Java Plugins cannot nbe activated at all, it seems)

    My environment W7 (but same true for Ubuntu 15.10),Java 8.66, Firefox 42, bu

  3. Jason Dill says:

    The above steps seems to be complicated. Instead, I would recommend using remote support tools such as logmein, gosupportnow, gotomypc, R-HUB (http://www.rhubcom.com), Bomgar etc. They are easy to use.

  4. Manuela says:

    obviously like your website but you have to check the spelling on several
    of your posts. Several of them are rife with spelling problems and I find it very bothersome to tell
    the truth nevertheless I will surely come back
    again.

  5. pavan says:

    What if i have 200 users want to create vnc and use.. this is not feasible ryt ? or do u have anyother option to configure as such

  6. John says:

    Hi,
    Followed the above steps for rhel6 configuration and but when accessing vnc from browser from windows machine, its asking java authentication, with blank page , but there is no pop up for security warning or vnc authentication, please help

  7. Karl says:

    I’d suggest to try VNC viewer without Java based on Web – http://www.onlinevnc.com. Does not required Java at all.

    • erm3nda says:

      Sure this is a full html5 or javascript interface to handle a vncviewer running on a remote machine, like a linux server.
      So, is not your script the one that connects. Also, avoid using 3rd Party. This can be done using other methods.

  8. amit says:

    thanks alot ravi

Leave a Reply to Dzulqarnain Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.