VNC Java Client Setup for Remote Access
One of the requirements that we have is to be able to look at the status of a running test to verify the status.
Follow the directions below if you want to reach different hosts from a single point of contact.
Here are steps for doing this on Oracle Linux (I used Apache, but hopefully this should work with NodeJS eventually)-
- Install Apache (sudo yum install httpd)
- Modify the /etc/httpd/conf/httpd.conf and add the following section to it under 'Aliases' -
- Create a new folder under the Apache root (mkdir /var/www/vnc)
- Download the TightVNC Java client to the server and untar it (Download link - http://downloads.sourceforge.net/project/vnc-tight/TightVNC-javaviewer/1.3.10/tightvnc-1.3.10_javasrc.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fvnc-tight%2Ffiles%2FTightVNC-javaviewer%2F1.3.10%2F&ts=1373659987&use_mirror=iweb)
- Move all the .class and .jar files to /var/www/vnc
- Install the JDK and the JDK developer tools (java-1.7.0-openjdk-devel.x86_64)
- Generate a new key using keytool (keytool -genkey -keyalg rsa -alias vnckey). You will be prompted to provide some information for the key -
- Create a new key store password and confirm it by typing it in again when prompted
- The rest of the transaction looks like this -
What is your first and last name?
[Unknown]: FName LName
What is the name of your organizational unit?
[Unknown]: MyGroup
What is the name of your organization?
[Unknown]: Some Company
What is the name of your City or Locality?
[Unknown]: New York
What is the name of your State or Province?
[Unknown]: New York
What is the two-letter country code for this unit?
[Unknown]: US
Is CN=FName LName, OU= MyGroup, O=Some Company, L=New York, ST=New York, C=US correct?
[no]: yes
Enter key password for
(RETURN if same as keystore password):
- Export the certificate you just created (keytool -export vnckey -file vnckey.crt)
- Sign the VNC jar file using the key you just created (jarsigner /var/www/vnc/VncViewer.jar vnckey)
- Your certificate is valid for 6 months and you will need to re-sign the applet again in 6 months (unless you sign it with an authoritative key)
- Create your HTML page for the applet -
- The full list of available parameters is in the README - http://www.tightvnc.com/doc/java/README.txt
- A few things to be aware of -
- Unsigned Java applets are sandboxed and cannot make remote connections. They can only connect to localhost. If you see "Error: access denied (java.net.SocketPermission", the applet is unsigned
- Make sure that the VNC Server has a read-only password set so that your mouse clicks and keystrokes don't interrupt work in progress
- The first time you run the app, you will be prompted to give the app permission to run. Make sure you check all the boxes or the applet will not run
Comments