[PVE-User] External VNC Applet

Guy guy at britewhite.net
Sun Oct 7 19:36:53 CEST 2012

Here's a copy of my HTML/Ruby which opens a console..It works, however it does suffer from the console hanging after a short idle time.  I've never managed to solve that...

<HTML class="x-border-box x-quirks x-viewport">
<HEAD><TITLE>Client Console: <%= @vm.comment %></TITLE>
<script type="text/javascript" src="/ext-all-debug.js"></script>
<script type="text/javascript">function gettext(buf) { return buf; }</script>
<script type="text/javascript" src="/pvemanagerlib.js"></script>


<body class="x-body x-webkit x-safari x-mac x-reset x-container x-container-default x-layout-fit" id="ext-gen1009" role="application">
<div id="pveKVMConsole-1018-body" class="x-panel-body x-panel-body-default x-panel-body-default x-layout-fit x-docked-noborder-right x-docked-noborder-bottom x-docked-noborder-left" style="width: 1024px; height: 768px; left: 0px; top: 0px; ">
<div id="component-1019" class="x-component x-fit-item x-component-default" role="presentation" style="margin: 0px; width: 1024px; height: 767px; ">
	<applet width="100%" height="100%" border="false" archive="/VncViewer.jar" code="com.tigervnc.vncviewer.VncViewer" style="width: 1024px; height: 768px;">
    <param name="PVECert" value="<%= @newcert %>">
    <param name="HOST" value="<%= @host %>">
    <param name="PORT" value="<%= @vncport %>"> 
    <param name="Show Controls" value="No">
    <param name="Offer Relogin" value="No"> 
    <param name="USERNAME" value="<%= @username %>">
    <param name="PASSWORD" value="<%= @ticket %>">

    <!-- Fields required for history management -->
    <form id="history-form" class="x-hidden">
    <input type="hidden" id="x-history-field">

<iframe frameborder="0" class="x-shim" src="about:blank" id="ext-gen1014" style="display: none; "></iframe><div id="ext-comp-1015" class="x-tip x-tip-default x-layer" style="position: absolute; display: none; left: 373px; top: 214px; " role="tooltip" aria-labelledby="component-1017"><div id="ext-comp-1015-body" class="x-tip-body  x-tip-body-default x-tip-body-default"></div><div class="x-tip-anchor x-tip-anchor-top" id="ext-gen1011" style="z-index: 1; "></div></div><div tabindex="-1" class="x-focus-element" id="ext-gen1035"> </div></body>



On 7 Oct 2012, at 18:00, Adnan RIHAN <axel50397 at gmail.com> wrote:

> [Sent to pve-devel, no answer :/]
> Hello Proxmox !
> I have some VPS (PV2 2.1) and I'm making some APIs (Proxy API) to allow my customers building their own app/website to manage their VPS.
> Today, I'm making a test script to show the VNCViewer (vncproxy) from my computer, and I'm trying to make it LIKE the proxmox VNCViewer. I'm ok with the headers, the tokens, the ticket and the info about the VNC (PORT/Cert/User/Pass). My problem is embedding proxmox (tigervnc) java applet in an external HTML Page.
> Here is my code: http://pastebin.com/aG3m0FYs
> I've checked the 'param's, they're good (I put them correctly), and I also have a valid certificate on proxmox (pve-ssl.key & pve-ssl.pem).
> So, when I try to load the page, the applet shows blackscreen for less than 1 sec then "Error: Server did not offer supported security type".
> I know that there is a thing with authentication not supported by the new VNC servers, but I'm strictly using the same applet that on my proxmox server, but maybe I'm using it badly.
> Then I've noticed that the applet is trying to connect to the current webpage hostname, not the hostname of the server where the .jar is.
> So... I've read tigerVNC sources a little, and I found a "Server" parameter. So I tried to add it in the <param> list:
>> <param name='Server' value='<?php echo "MY_HOST::".$res->data->port; ?>'>
> Still the same Error. Maybe the server only accepts localhost connection… Or does anyone have an idea :) ?
> Thank you all !
> -- 
> Cordialement, Adnan RIHAN.
> Président-Fondateur de l'association (de loi 1901) Virtual-Info, hébergeur Web et Serveurs de Jeux.
> Directeur-Technique pour le groupe Rininvest.
> Consultant-Technicien Supérieur en Informatique de Gestion.
> Ambassadeur Qt (Projet Tag-PG).
> _______________________________________________
> pve-user mailing list
> pve-user at pve.proxmox.com
> http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-user

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://pve.proxmox.com/pipermail/pve-user/attachments/20121007/879a706f/attachment-0014.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4885 bytes
Desc: not available
URL: <http://pve.proxmox.com/pipermail/pve-user/attachments/20121007/879a706f/attachment-0014.bin>

More information about the pve-user mailing list