User Tools

Site Tools


wiki:ponyland:vncviewer

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

wiki:ponyland:vncviewer [2019/04/25 15:23] (current)
Line 1: Line 1:
 +{{page>​vnc:​@USER@}}
  
 +<​HTML>​
 +<div id="​pleaselogin"><​i>​Log in to the wiki to automatically fill in these values</​i></​div>​
 +<div id="​vncviewer">​
 +
 +<table border="​0">​
 +<​th><​label for="​user">​User:</​th><​td><​input id="​user"​ value=""/></​label></​td><​td><​i>​Your Ponyland account name</​i></​td></​tr>​
 +<​th><​label for="​host">​Host:</​th><​td><​input id="​host"​ value="​applejack"/></​label></​td><​td><​i>​The machine you started '​vncstart'​ on</​i></​td></​tr>​
 +<​th><​label for="​display">​Display:</​th><​td><​input id="​display"​ value="​10"/></​label></​td><​td><​i>​The Display number that was assigned to you.</​i></​td></​tr>​
 +</​table>​
 +
 +<div style="​color:​ #​999"><​ul>​
 +<​li>​Requires Java-Plugin and Windows</​li>​
 +<​li>​You will be asked your SSH password, and <​emph>​then</​emph>​ your VNC password.</​li>​
 +</​ul></​div>​
 +
 +<​p><​button id="​start">​Start VNC Viewer</​button></​p>​
 +
 +</​div>​
 +<div id="​appletcontainer"></​div>​
 +
 +<​script>​
 +if( window.vncsession ) {
 +  var user = window.vncsession.user;​
 +  var host = window.vncsession.host;​
 +  var display = window.vncsession.display;​
 +  jQuery('#​pleaselogin'​).hide();​
 +} else {
 +  var user = '';​
 +  var host = '​applejack';​
 +  var display = '';​
 +}
 +jQuery('#​user'​).val(user);​
 +jQuery('#​host'​).val(host);​
 +jQuery('#​display'​).val(display);​
 +function startApplet() {
 + var archive = '/​_media/​tightvnc-jviewer.jar';​
 + var applet = jQuery('<​applet/>'​);​
 + var params = {
 + Host: jQuery('#​host'​).val(),​
 + Port: parseInt(jQuery('#​display'​).val()) + 5900,
 + OpenNewWindow:​ "​yes",​
 + ShowControls:​ "​yes",​
 + ViewOnly:​ "​no",​
 + AllowClipboardTransfer:​ "​yes",​
 +    RemoteCharset:​ "​standard",​
 +
 + ShareDesktop:​ "​yes",​
 + AllowCopyRect:​ "​yes",​
 + Encoding:​ "​Tight",​
 + CompressionLevel:​ "",​
 + JpegImageQuality:​ "",​
 + LocalPointer:​ "​On",​
 + ConvertToASCII:​ "​no",​
 +
 + colorDepth:​ "​16",​
 + ScalingFactor:​ "​100",​
 +
 +    sshHost:​ "​lilo3.science.ru.nl",​
 +    sshUser:​ jQuery('#​user'​).val(),​
 +    sshPort:​ ""​
 + }
 + applet.attr('​code',​ '​com.glavsoft.viewer.Viewer'​);​
 + applet.width(1).height(1);​
 + for( var param in params ) {
 + if( params.hasOwnProperty(param) ) {
 + var domparam = jQuery('<​param/>'​);​
 + domparam.attr('​name',​ param).attr('​value',​ params[param]);​
 + applet.append(domparam);​
 + }
 + }
 + applet.attr('​archive',​ archive);
 + //​console.log(applet[0].outerHTML);​
 + jQuery('#​start'​).attr('​disabled',​ '​disabled'​).text('​Starting...'​).unbind('​click'​);​
 + jQuery('#​appletcontainer'​).html(applet);​
 +}
 +jQuery('#​start'​).click(startApplet);​
 +</​script>​
 +</​HTML>​
wiki/ponyland/vncviewer.txt ยท Last modified: 2019/04/25 15:23 (external edit)