For anyone that has this issue, I came up with a temporary solution that is 
easy to implement. This will show a count down of 5 seconds then show the Get 
RDP File button.  This allows enough time for the VCL client to be configured.  
Tested with IE and Firefox.  Use at own risk!

Roughly around line 2217 (v2.2.1) on requests.php replace the Get RDP File form 
section with:

print "<style type=\"text/css\">\n";
print " .off {\n";
print " visibility: hidden;\n";
print " } .on {\n";
print " visibility: visible;\n";
print " }\n";
print "</style>\n";
print "<script type=\"text/javascript\">\n";
print " window.onload = function() {\n";
print " var timeInterval = 5;\n";
print " if (typeof timeInterval === 'undefined' || parseInt(timeInterval) <= 0) 
print "         timeInterval = 1\n";
print " }\n";
print "document.getElementById('counter').innerHTML = \" Ready to connect in \" 
+ timeInterval + \" seconds\";\n";
print "var si = setInterval(function() {\n";
print "if (timeInterval === 0) {\n";
print "         clearInterval(si);\n";
print " } else {\n";
print "--timeInterval;\n";
print "if (timeInterval !== 0) {\n";
print "         document.getElementById('counter').innerHTML = \" Ready to 
connect in \" + timeInterval + \" seconds\";\n";
print "} else {\n";
print "         document.getElementById('counter').className = 'off'; //Hiding 
the counter area.\n";
print "         document.getElementById('submit').className = 'on'; //Unhide 
the Submit button\n";
print "}\n";
print "}\n";
print "}, 1000);\n";
print "setTimeout(function() {\n";
print "}, timeInterval * 1000);\n";
print "}\n";
print "</script>\n";

print "For automatic connection, you can download an RDP file that can ";
print "be opened by the Remote Desktop Connection program.<br><br>\n";
print "<b id=counter></b>";
print "<table summary=\"\">\n";
print "  <TR>\n";
print "    <TD>\n";
print "      <FORM action=\"" . BASEURL . SCRIPT . "\" method=post  
        $cdata = array('requestid' => $requestid,
        'resid' => $requestData['reservations'][0]['reservationid']);
        $expire = datetimeToUnix($requestData['end']) -
        datetimeToUnix($requestData['start']) + 1800; # reservation time plus 
30 min
        $cont = addContinuationsEntry('sendRDPfile', $cdata, $expire);
print "      <INPUT type=hidden name=continuation value=\"$cont\">\n";
print "      <INPUT type=submit value=\"Get RDP File\" class=\"off\" 
print "      </FORM>\n";
print "    </TD>\n";
print "  </TR>\n";
print "</table>\n";

- Gerhard Hartl
Old Dominion University
Norfolk, VA

-----Original Message-----
From: Andy Kurth [] 
Sent: Monday, April 04, 2011 1:33 PM
Subject: Re: "Get RDP File" Doesn't work first try if too fast

I have seen the same issue myself.  It's a timing issue related to the 
'reserved' state.  During this state, the vcld process loops until it detects a 
value in reservation.remoteIP which gets set when the user clicks 'Connect'.  
There is a 5 second wait in between attempts.  This could be reduced but the 
downside would be a little more processing on the management node.

Once it detects the remote IP has been set, it can take 3-9 seconds for the 
firewall-opening commands to be executed.

Quickly looking at the code, I think some improvements can be made to reduce 
the lag time.  I created an issue for this:


On 4/1/2011 2:58 PM, Hartl, Gerhard L. wrote:
> (disregard previous, forgot to retitle)
> Since upgrading to 2.2, when a user browses to the 'connect' page, I've 
> noticed that the clients ip is captured and the management node then ssh's to 
> the vm and opens up the port for the clients ip on 3389.   While I understand 
> this is best practice, I have noticed that if they user is to quick clicking 
> through the page that they sometimes have to click the "Get RDP File" twice 
> since the first time tries to connect prior to the port being opened up.  Is 
> there any way around this?
> - Gerhard Hartl
> Old Dominion University
> Norfolk, VA


Teach CanIt if this mail (ID 465117226) is spam:
Not spam:
Forget vote:

Reply via email to