You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@vcl.apache.org by "Casa 40 B. de A." <ca...@gmail.com> on 2012/09/05 21:21:16 UTC

Change RDP file configuration from mangement node or web server

Hi everybody

When we make a reservation, RDP file is configured with IP address of the
computer reserved.

We need RDP file is configured with the hostname of the computer and our
domain name (hostname.my.domain.org) instead IP address. Is it possible to
configure like this?

I'am newby in VCL
Kind regards to all

Re: Change RDP file configuration from mangement node or web server

Posted by Josh Thompson <jo...@ncsu.edu>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Dan,

To change the Connect page to display the hostname instead of the IP
address, you need to edit vcl/.ht-inc/requests.php.  Starting on line
3394, you should see this:

$tos = array($conuser,
             $passwd,
             $res['connectIP'],
             $res['connectport']);

Change

$res['connectIP'],

to

gethostbyaddr($res['connectIP']),

so that you have

$tos = array($conuser,
             $passwd,
             gethostbyaddr($res['connectIP']),
             $res['connectport']);

Josh

On 09/21/12 12:00, Casa 40 B. de A. wrote:
> Josh
> 
> I solved it. When I click on Get RDP File button the RDP file is
> configure to connect to hostname. Thanks to all for their
> comments.
> 
> Can you explain me how to change what is displayed on the Connect
> page to be the hostname instead of the IP address?
> 
> Regards Dan
> 
> 
> 
> 2012/9/7 Josh Thompson <jo...@ncsu.edu>
> 
> Dan,
> 
> What Kelly suggested should work.  However, it only changes it in
> the RDP file delivered by clicking the "Get RDP File" button.  When
> you click that button, is your browser automatically opening it in
> Remote Desktop Connection?  If so, are you saying that Computer
> field has an IP address in it instead of a hostname?  If your
> browser is not automatically opening the file in Remote Desktop
> Connection, can you open the file in a text editor and verify you 
> are actually getting an IP address instead of a hostname?
> 
> After resolving this part, I can explain how to change what is
> displayed on the Connect page to be the hostname instead of the IP
> address.
> 
> Josh
> 
> On Wed September 5 2012 5:46:58 PM Casa 40 B. de A. wrote:
>>>> Thanks for your information. I have trying with your
>>>> suggestion but it
> not
>>>> function, the connection continues with IP address. I have
>>>> VCL 2.2.1
>>>> 
>>>> Any suggestion?
>>>> 
>>>> Dan
>>>> 
>>>> 
>>>> 
>>>> 2012/9/5 Kelly Patrice Robinson <kr...@gsu.edu>
>>>> 
>>>>> Someone else may have a more elegant solution, but we
>>>>> tested this by
>>>>> 
>>>>> editing the following lines the sendRDPfile() function in
>>>>> the utils.php file and registering our hostname in within
>>>>> dns.
>>>>> 
>>>>> function sendRDPfile() {
>>>>> 
>>>>> … #see excerpt below
>>>>> 
>>>>> print "session bpp:i:$bpp\r\n"; print
>>>>> "winposstr:s:0,1,382,71,1182,671\r\n";
>>>>> 
>>>>> #print "full address:s:$ipaddress\r\n";
>>>>> 
>>>>> #COMMENTED OUT THIS LINE
>>>>> 
>>>>> $vm_hostname  gethostbyaddr($ipaddress);   #ADDED THIS
>>>>> LINE
>>>>> 
>>>>> print "full address:s:$vm_hostname\r\n";           #ADDED
>>>>> THIS LINE
>>>>> 
>>>>> …
>>>>> 
>>>>> Kelly From: "Casa 40 B. de A." <ca...@gmail.com>
>>>>> 
>>>>> Reply-To: <us...@vcl.apache.org> Date: Wed, 5 Sep 2012
>>>>> 14:21:16 -0500 To: <us...@vcl.apache.org> Subject: Change
>>>>> RDP file configuration from mangement node or web
> server
>>>>> 
>>>>> Hi everybody
>>>>> 
>>>>> When we make a reservation, RDP file is configured with IP
>>>>> address of
>>>>> 
>>>>> the computer reserved.
>>>>> 
>>>>> We need RDP file is configured with the hostname of the
>>>>> computer and
> our
>>>>> 
>>>>> domain name (hostname.my.domain.org) instead IP address. Is
>>>>> it
> possible
>>>>> to configure like this?
>>>>> 
>>>>> I'am newby in VCL
>>>>> 
>>>>> Kind regards to all
>> 
>> 
> 

- -- 
- -------------------------------
Josh Thompson
VCL Developer
North Carolina State University

my GPG/PGP key can be found at pgp.mit.edu

All electronic mail messages in connection with State business which
are sent to or received by this account are subject to the NC Public
Records Law and may be disclosed to third parties.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)

iEYEARECAAYFAlBjUyIACgkQV/LQcNdtPQN0uQCfaFWmVpJzj2pjdk43secnS7X0
xzgAnisvv5GTQGwXCR48VtD+xB0CYWRy
=bbMD
-----END PGP SIGNATURE-----

Re: Change RDP file configuration from mangement node or web server

Posted by "Casa 40 B. de A." <ca...@gmail.com>.
Josh

I solved it. When I click on Get RDP File button the RDP file is configure
to connect to hostname. Thanks to all for their comments.

Can you explain me how to change what is displayed on the Connect page to
be the hostname instead of the IP address?

Regards
Dan



2012/9/7 Josh Thompson <jo...@ncsu.edu>

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Dan,
>
> What Kelly suggested should work.  However, it only changes it in the RDP
> file
> delivered by clicking the "Get RDP File" button.  When you click that
> button,
> is your browser automatically opening it in Remote Desktop Connection?  If
> so,
> are you saying that Computer field has an IP address in it instead of a
> hostname?  If your browser is not automatically opening the file in Remote
> Desktop Connection, can you open the file in a text editor and verify you
> are
> actually getting an IP address instead of a hostname?
>
> After resolving this part, I can explain how to change what is displayed on
> the Connect page to be the hostname instead of the IP address.
>
> Josh
>
> On Wed September 5 2012 5:46:58 PM Casa 40 B. de A. wrote:
> > Thanks for your information. I have trying with your suggestion but it
> not
> > function, the connection continues with IP address. I have VCL 2.2.1
> >
> > Any suggestion?
> >
> > Dan
> >
> >
> >
> > 2012/9/5 Kelly Patrice Robinson <kr...@gsu.edu>
> >
> > >  Someone else may have a more elegant solution, but we tested this by
> > >
> > > editing the following lines the sendRDPfile() function in the utils.php
> > > file and registering our hostname in within dns.
> > >
> > >  function sendRDPfile() {
> > >
> > > …
> > > #see excerpt below
> > >
> > >         print "session bpp:i:$bpp\r\n";
> > >         print "winposstr:s:0,1,382,71,1182,671\r\n";
> > >
> > >          #print "full address:s:$ipaddress\r\n";
> > >
> > > #COMMENTED OUT THIS LINE
> > >
> > >          $vm_hostname  gethostbyaddr($ipaddress);   #ADDED THIS LINE
> > >
> > >         print "full address:s:$vm_hostname\r\n";           #ADDED THIS
> > >         LINE
> > >
> > >  …
> > >
> > >  Kelly
> > >  From: "Casa 40 B. de A." <ca...@gmail.com>
> > >
> > > Reply-To: <us...@vcl.apache.org>
> > > Date: Wed, 5 Sep 2012 14:21:16 -0500
> > > To: <us...@vcl.apache.org>
> > > Subject: Change RDP file configuration from mangement node or web
> server
> > >
> > >  Hi everybody
> > >
> > >  When we make a reservation, RDP file is configured with IP address of
> > >
> > > the computer reserved.
> > >
> > >  We need RDP file is configured with the hostname of the computer and
> our
> > >
> > > domain name (hostname.my.domain.org) instead IP address. Is it
> possible
> > > to configure like this?
> > >
> > >  I'am newby in VCL
> > >
> > > Kind regards to all
> - --
> - -------------------------------
> Josh Thompson
> Systems Programmer
> Virtual Computing Lab (VCL)
> North Carolina State University
>
> Josh_Thompson@ncsu.edu
> 919-515-5323
>
> my GPG/PGP key can be found at www.keyserver.net
> - --
> - -------------------------------
> Josh Thompson
> Systems Programmer
> Virtual Computing Lab (VCL)
> North Carolina State University
>
> Josh_Thompson@ncsu.edu
> 919-515-5323
>
> my GPG/PGP key can be found at www.keyserver.net
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2.0.19 (GNU/Linux)
>
> iD8DBQFQSeb7V/LQcNdtPQMRAhB+AJ9AH+md/6QXxnMSvcTzPTfI79AXUwCbB/rQ
> m/Zm6VGWIG0hVFJgbiJVfkQºqN
> -----END PGP SIGNATURE-----
>
>

Re: Change RDP file configuration from mangement node or web server

Posted by Aaron Coburn <ac...@amherst.edu>.
To this I would add that the gethostbyaddr() function will return an unmodified IP address if the DNS query fails. See http://php.net/manual/en/function.gethostbyaddr.php for more information.

If that is the case, you may want to confirm that DNS lookups are working properly on the management node. Otherwise, Josh and Kelly are correct that this should work.

Aaron Coburn

  
On Sep 7, 2012, at 8:22 AM, Josh Thompson <jo...@ncsu.edu> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Dan,
> 
> What Kelly suggested should work.  However, it only changes it in the RDP file
> delivered by clicking the "Get RDP File" button.  When you click that button,
> is your browser automatically opening it in Remote Desktop Connection?  If so,
> are you saying that Computer field has an IP address in it instead of a
> hostname?  If your browser is not automatically opening the file in Remote
> Desktop Connection, can you open the file in a text editor and verify you are
> actually getting an IP address instead of a hostname?
> 
> After resolving this part, I can explain how to change what is displayed on
> the Connect page to be the hostname instead of the IP address.
> 
> Josh
> 
> On Wed September 5 2012 5:46:58 PM Casa 40 B. de A. wrote:
>> Thanks for your information. I have trying with your suggestion but it not
>> function, the connection continues with IP address. I have VCL 2.2.1
>> 
>> Any suggestion?
>> 
>> Dan
>> 
>> 
>> 
>> 2012/9/5 Kelly Patrice Robinson <kr...@gsu.edu>
>> 
>>> Someone else may have a more elegant solution, but we tested this by
>>> 
>>> editing the following lines the sendRDPfile() function in the utils.php
>>> file and registering our hostname in within dns.
>>> 
>>> function sendRDPfile() {
>>> 
>>> …
>>> #see excerpt below
>>> 
>>>        print "session bpp:i:$bpp\r\n";
>>>        print "winposstr:s:0,1,382,71,1182,671\r\n";
>>> 
>>>         #print "full address:s:$ipaddress\r\n";
>>> 
>>> #COMMENTED OUT THIS LINE
>>> 
>>>         $vm_hostname = gethostbyaddr($ipaddress);   #ADDED THIS LINE
>>> 
>>>        print "full address:s:$vm_hostname\r\n";           #ADDED THIS
>>>        LINE
>>> 
>>> …
>>> 
>>> Kelly
>>> From: "Casa 40 B. de A." <ca...@gmail.com>
>>> 
>>> Reply-To: <us...@vcl.apache.org>
>>> Date: Wed, 5 Sep 2012 14:21:16 -0500
>>> To: <us...@vcl.apache.org>
>>> Subject: Change RDP file configuration from mangement node or web server
>>> 
>>> Hi everybody
>>> 
>>> When we make a reservation, RDP file is configured with IP address of
>>> 
>>> the computer reserved.
>>> 
>>> We need RDP file is configured with the hostname of the computer and our
>>> 
>>> domain name (hostname.my.domain.org) instead IP address. Is it possible
>>> to configure like this?
>>> 
>>> I'am newby in VCL
>>> 
>>> Kind regards to all
> - --
> - -------------------------------
> Josh Thompson
> Systems Programmer
> Virtual Computing Lab (VCL)
> North Carolina State University
> 
> Josh_Thompson@ncsu.edu
> 919-515-5323
> 
> my GPG/PGP key can be found at www.keyserver.net
> - --
> - -------------------------------
> Josh Thompson
> Systems Programmer
> Virtual Computing Lab (VCL)
> North Carolina State University
> 
> Josh_Thompson@ncsu.edu
> 919-515-5323
> 
> my GPG/PGP key can be found at www.keyserver.net
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2.0.19 (GNU/Linux)
> 
> iD8DBQFQSeb7V/LQcNdtPQMRAhB+AJ9AH+md/6QXxnMSvcTzPTfI79AXUwCbB/rQ
> m/Zm6VGWIG0hVFJgbiJVfkQ�qN
> -----END PGP SIGNATURE-----
> 


Re: Change RDP file configuration from mangement node or web server

Posted by Josh Thompson <jo...@ncsu.edu>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Dan,

What Kelly suggested should work.  However, it only changes it in the RDP file 
delivered by clicking the "Get RDP File" button.  When you click that button, 
is your browser automatically opening it in Remote Desktop Connection?  If so, 
are you saying that Computer field has an IP address in it instead of a 
hostname?  If your browser is not automatically opening the file in Remote 
Desktop Connection, can you open the file in a text editor and verify you are 
actually getting an IP address instead of a hostname?

After resolving this part, I can explain how to change what is displayed on 
the Connect page to be the hostname instead of the IP address.

Josh

On Wed September 5 2012 5:46:58 PM Casa 40 B. de A. wrote:
> Thanks for your information. I have trying with your suggestion but it not
> function, the connection continues with IP address. I have VCL 2.2.1
> 
> Any suggestion?
> 
> Dan
> 
> 
> 
> 2012/9/5 Kelly Patrice Robinson <kr...@gsu.edu>
> 
> >  Someone else may have a more elegant solution, but we tested this by
> > 
> > editing the following lines the sendRDPfile() function in the utils.php
> > file and registering our hostname in within dns.
> > 
> >  function sendRDPfile() {
> > 
> > …
> > #see excerpt below
> > 
> >         print "session bpp:i:$bpp\r\n";
> >         print "winposstr:s:0,1,382,71,1182,671\r\n";
> >         
> >          #print "full address:s:$ipaddress\r\n";
> > 
> > #COMMENTED OUT THIS LINE
> > 
> >          $vm_hostname = gethostbyaddr($ipaddress);   #ADDED THIS LINE
> >         
> >         print "full address:s:$vm_hostname\r\n";           #ADDED THIS
> >         LINE
> >  
> >  …
> >  
> >  Kelly
> >  From: "Casa 40 B. de A." <ca...@gmail.com>
> > 
> > Reply-To: <us...@vcl.apache.org>
> > Date: Wed, 5 Sep 2012 14:21:16 -0500
> > To: <us...@vcl.apache.org>
> > Subject: Change RDP file configuration from mangement node or web server
> > 
> >  Hi everybody
> >  
> >  When we make a reservation, RDP file is configured with IP address of
> > 
> > the computer reserved.
> > 
> >  We need RDP file is configured with the hostname of the computer and our
> > 
> > domain name (hostname.my.domain.org) instead IP address. Is it possible
> > to configure like this?
> > 
> >  I'am newby in VCL
> > 
> > Kind regards to all
- -- 
- -------------------------------
Josh Thompson
Systems Programmer
Virtual Computing Lab (VCL)
North Carolina State University

Josh_Thompson@ncsu.edu
919-515-5323

my GPG/PGP key can be found at www.keyserver.net
- -- 
- -------------------------------
Josh Thompson
Systems Programmer
Virtual Computing Lab (VCL)
North Carolina State University

Josh_Thompson@ncsu.edu
919-515-5323

my GPG/PGP key can be found at www.keyserver.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)

iD8DBQFQSeb7V/LQcNdtPQMRAhB+AJ9AH+md/6QXxnMSvcTzPTfI79AXUwCbB/rQ
m/Zm6VGWIG0hVFJgbiJVfkQ�qN
-----END PGP SIGNATURE-----


Re: Change RDP file configuration from mangement node or web server

Posted by "Casa 40 B. de A." <ca...@gmail.com>.
Thanks for your information. I have trying with your suggestion but it not
function, the connection continues with IP address. I have VCL 2.2.1

Any suggestion?

Dan



2012/9/5 Kelly Patrice Robinson <kr...@gsu.edu>

>  Someone else may have a more elegant solution, but we tested this by
> editing the following lines the sendRDPfile() function in the utils.php
> file and registering our hostname in within dns.
>
>  function sendRDPfile() {
> …
> #see excerpt below
>         print "session bpp:i:$bpp\r\n";
>         print "winposstr:s:0,1,382,71,1182,671\r\n";
>          #print "full address:s:$ipaddress\r\n";
> #COMMENTED OUT THIS LINE
>          $vm_hostname = gethostbyaddr($ipaddress);   #ADDED THIS LINE
>         print "full address:s:$vm_hostname\r\n";           #ADDED THIS LINE
>  …
>
>  Kelly
>  From: "Casa 40 B. de A." <ca...@gmail.com>
> Reply-To: <us...@vcl.apache.org>
> Date: Wed, 5 Sep 2012 14:21:16 -0500
> To: <us...@vcl.apache.org>
> Subject: Change RDP file configuration from mangement node or web server
>
>  Hi everybody
>
>  When we make a reservation, RDP file is configured with IP address of
> the computer reserved.
>
>  We need RDP file is configured with the hostname of the computer and our
> domain name (hostname.my.domain.org) instead IP address. Is it possible
> to configure like this?
>
>  I'am newby in VCL
> Kind regards to all
>
>
>

Re: Change RDP file configuration from mangement node or web server

Posted by Kelly Patrice Robinson <kr...@gsu.edu>.
Someone else may have a more elegant solution, but we tested this by editing the following lines the sendRDPfile() function in the utils.php file and registering our hostname in within dns.

function sendRDPfile() {
…
#see excerpt below
        print "session bpp:i:$bpp\r\n";
        print "winposstr:s:0,1,382,71,1182,671\r\n";
        #print "full address:s:$ipaddress\r\n";                 #COMMENTED OUT THIS LINE
        $vm_hostname = gethostbyaddr($ipaddress);   #ADDED THIS LINE
        print "full address:s:$vm_hostname\r\n";           #ADDED THIS LINE
…

Kelly
From: "Casa 40 B. de A." <ca...@gmail.com>>
Reply-To: <us...@vcl.apache.org>>
Date: Wed, 5 Sep 2012 14:21:16 -0500
To: <us...@vcl.apache.org>>
Subject: Change RDP file configuration from mangement node or web server

Hi everybody

When we make a reservation, RDP file is configured with IP address of the computer reserved.

We need RDP file is configured with the hostname of the computer and our domain name (hostname.my.domain.org<http://hostname.my.domain.org>) instead IP address. Is it possible to configure like this?

I'am newby in VCL
Kind regards to all