@cherrypy.expose
@cherrypy.tools.mako(filename="/vnc.mako")
+
def vnc(self, machine_id):
- """VNC applet page.
+ """VNC applet page"""
+ return self._vnc(machine_id)
+
+ @cherrypy.expose
+ @cherrypy.tools.response_headers(headers=[('Content-Disposition', 'attachment; filename=vnc.jnlp')])
+ @cherrypy.tools.mako(filename="/vnc_jnlp.mako", content_type="application/x-java-jnlp-file")
+ def vnc_jnlp(self, machine_id):
+ """VNC applet exposed as a Java Web Start app (JNLP file)"""
+ return self._vnc(machine_id)
+
+ def _vnc(self, machine_id):
+ """VNC applet page functionality.
Note that due to same-domain restrictions, the applet connects to
the webserver, which needs to forward those requests to the xen
<param name="VMNAME" value="${machine.name}">
<param name="AUTHTOKEN" value="${authtoken}">
<param name="SocketFactory" value="VNCProxyConnectSocketFactory">
-You must have Java enabled in your browser to use the VNC console.
+You must have Java enabled in your browser to use the VNC console applet. If your browser does not support Java, but you do have a Java Runtime Environment installed, try clicking <a href="machine/${machine.machine_id}/vnc_jnlp">here</a> to launch the VNC console via Java Web Start.
</applet>
--- /dev/null
+<jnlp spec="1.0+" codebase="https://xvm.mit.edu:446/static/">
+ <information>
+ <title>XVM Java Console</title>
+ <vendor>Invirt Project</vendor>
+ <description>Java Web Start Application</description>
+ </information>
+
+ <security>
+ <all-permissions/>
+ </security>
+
+ <resources>
+ <property name="jnlp.packEnabled" value="true"/>
+ <j2se version="1.6.0+" initial-heap-size="32M" max-heap-size="128M"/>
+ <jar href="VncViewer.jar" download="eager" main="true"/>
+ </resources>
+ <applet-desc main-class="VncViewer" name="VncViewer" width="1000" height="1000">
+ <param name="PORT" value="${port}" />
+ <param name="HOST" value="${hostname}" />
+ <param name="VMNAME" value="${machine.name}" />
+ <param name="AUTHTOKEN" value="${authtoken}" />
+ <param name="SocketFactory" value="VNCProxyConnectSocketFactory" />
+ </applet-desc>
+</jnlp>
+invirt-web (0.1.53~glasgall1) precise; urgency=medium
+
+ * Add Java Web Start support for Java HVM console as a stopgap until we
+ have a proper JavaScript one, since browsers by and large don't have a
+ Java plugin anymore.
+
+ -- Adam Glasgall <glasgall@mit.edu> Thu, 14 Jun 2018 20:11:44 -0400
+
invirt-web (0.1.52) unstable; urgency=low
* preseeds: Correct country string error; fixes mirror selection