VNC over java applet added to the server.

I wanted to take some time off from the ‘upgrade hell’ that I’ve been putting myself through.  So, I got serious and finished a project that has been in the conception form in my head only.  I wanted to get the server’s vnc server able to be connected to by a ‘java-aware’ browser.

I decided to do this because some firewalls/antivirus protection suites tend to block traditional VNC as a ‘security risk’.  Hogwash as long as the admin properly sets it up.  So, this method will circumvent being blocked from running a vnc client like that.  However, the server needs a few things running on it in order to do this: tigervnc-server-applet (since the server runs tigervnc), tinyvnc java viewer, and the jdk and jre from oracle. (Java developer’s kit and Java run-time environment)  Here’s how to do it:

First, you need to install the jdk and jre.  Go to this page and download both files after you accept the agreement.  Java.  You install it on Fedora with the following commands, as the root user.

## Install Java on 32-Bit OS ##
# rpm -Uvh jdk-7u25-linux-i586.rpm
# rpm -Uvh jre-7u25-linux-i586.rpm

## Install Java on 64-Bit OS ##
# rpm -Uvh jdk-7u25-linux-x64.rpm
# rpm -Uvh jre-7u25-linux-x64.rpm

Verify that it’s running with the following two commands, and you should receive similar output:

# java -version
java version “1.7.0_45”
OpenJDK Runtime Environment (fedora-2.4.3.0.fc18-i386 u45-b15)
OpenJDK Client VM (build 24.45-b08, mixed mode, sharing)
# javac -version
javac 1.8.0_20

I also installed the server applet for tigervnc using the following:

# yum install tigervnc-server-applet

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. (You must be root user.)

# 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.1265901” and Password as “123” for my VNC user called “fakeuser“.

<param name=”Host” value=”172.16.25.126” /> <!– Host to connect. –>
<param name=”Port” value=”5901” /> <!– Port number to connect. –>
<!–param name=”Password” value=”” /–> <!– Password to the server. –>

*** Important *** Leave the Password value EMPTY, or it poses a security issue, unless the vncweb directory is password protected.

Access VNC Desktop of user “fakeuser” 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.

VNCWeb-2-620x387

Enter Password to access “fakeuser” vnc server.

VNCWeb-3-620x387

You will then be asked for your user password that tigervnc is running under in order to unlock the fakeuser’s desktop.

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

VNCWeb-5-620x387

 

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.

 

CRAB server updated to Fedora 18.

Fedora18Capture2 VNC Screenshot

Well, last night at about 0230 Hrs, the Fedora 18 update completed.  I really didn’t think that Fedup would work, since Fedora 17 was depreciated.  So, I used yum to perform the uprade:  (Become root)

# rpm –import https://fedoraproject.org/static/DE7F38BD.txt

# yum update yum

# yum clean all

# yum --releasever=18 --disableplugin=presto distro-sync

After it finished, I rebooted and quickly discovered that a couple major things were broken.  First, the ices was not running, so the stream was dead.  Second, Apache had upgraded from 2.2 to 2.4 and caused all the virtual hosts to die.

The ices problem was an easy one, as somehow libshout-devel had become not installed, so using yum, I reinstalled it.

The virtual hosts problem was a bit tougher.  I have a fairly unique configuration for my virtual hosts, in that httpd.conf ‘includes’ a vhost configuration file for each virtual host.  So, I had to copy my ‘includes’ back into the new httpd.conf file from the httpd.conf.rpmnew that the upgrade saved with the original config.  Then, I had to insert the following into each vhost config file right above Document Root:

<Directory path_to_document_root/>
Require all granted
</Directory>

Everything seems to be working fine, now I shall image this again, before I ponder what to do about the Fedora 19 upgrade.  Oh, before I forget, a vnc session looks a little bit different than a login at the server.  Here’s another look of vnc:

Fedora18Capture

CRAB server updated to Fedora 17.

Fedora17InstallCapture

Well, the upgrade to Fedora 16 puked last night, and the server wouldn’t boot, so I rolled it back to Fedora 15 using the last saved image.  (THIS is why you need to backup BEFORE you attempt an upgrade.)  Initially, I thought that this was slick.  Everything seemed to work: web server, blogs, etc., ftp and ssh access, as well as the stream.  However, I have spent the WHOLE day in dependency HELL.  Probably caused by being forced to skip F16, heh.  More on that later, as I will append this post with some specifics.  I finally got YumEx upgrading all the packages without errors, and as soon as that’s done, I will happily image this box again, and push towards Fedora 18.

Tech, music, and general ramblings…..