All our latest news

Blog

Get the latest news delivered to you

Control a computer from within your web browser

You can use the VNC SDK to create an HTML 5-enabled Viewer app that will run in any desktop web browser*. This means there’s nothing for your users to download or install; simply embed the Viewer app in a web page, publish the URL, and your users will be able to connect to and control Windows, Mac, Linux or Raspberry Pi computers from web browsers wherever they happen to be!

*Not mobile web browsers. But it’s simple to create a native Apple iOS or Android app instead.

HTML5 Blog

Want to try it out?

You can be up and running in a few minutes with our sample apps. 

First, set up the computer you want to control. If you read our last blog post, you’ll already know how to set up a Mac. To set up a Windows, Linux or Raspberry Pi computer, download the VNC SDK and read the appropriate vnc-sdk/samples/basicServer/README (for Pi, follow the instructions for Linux). Continue down the README until you’ve obtained a ‘listen’ Cloud address (enter test for the group name if you use vnc-sdk/tools/vnccloudaddresstool), and have successfully joined the computer to VNC Cloud.

Then, simply serve the HTML 5-enabled sample Viewer app:

  1. Use the following command to obtain a ‘connect’ VNC Cloud address, remembering to substitute in your API key and secret (Sign In top right to retrieve these from the Projects page):

    curl https://api.vnc.com/cloud/1.1/static-address -X POST -u your-API-key:your-API-secret -H "Content-Type:application/json" -H "Accept:application/json" -d '{"allowedActions":["connect"],"groups":["test"]}'
    
  2. Open vnc-sdk/samples/basicViewerHTML5/viewer.js and hard-code the 'connect' Cloud address and Cloud password, and also the 'listen' Cloud address of the Server sample app (peer) to connect to:

HTML5Blog middle


    You can test the Viewer app works locally by double-clicking vnc-sdk/samples/basicViewerHTML5/viewer.html to open it in your default web browser.

  1. Start a web server and emulate serving the Viewer app over the Internet. If evaluators will use Firefox, Safari, IE or MS Edge, and python 2.7+ is installed on the web server, the simplest thing to do is to run the built-in python HTTP server:

  2. cd vnc-sdk/samples/basicViewerHTML
    cp ../../lib/html5/vncsdk.js .
    python –m SimpleHTTPServer

    If evaluators will use Chrome, you'll need to set up and run an HTTPS web server instead, for example Apache.

  3. Instruct evaluators to navigate to http://your-ip-address:8000/viewer.html.

HTML5 Blog bottom

Get the latest news delivered to you

on

×