You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@guacamole.apache.org by Amarjeet Singh <am...@gmail.com> on 2018/03/03 12:09:34 UTC

Re: [jira] [Updated] (GUACAMOLE-512) Shared Drive redirection doesn't work with Ubuntu [ xrdp ]

Hi Team,

I have done the following changes to fix the above issue which works both
in *Windows  *as well as *Linux RDP.*


>
> *#define GUAC_FILESYSTEM_NAME          "C\0L\0O\0U\0D\0\0\0"**#define
> GUAC_FILESYSTEM_NAME_LENGTH   12*



*Instead of using above configurations I have used the following  (  No
 UTF-16 encoding  is required  ) :-   *


> *#define GUAC_FILESYSTEM_NAME          "CLOUD"**#define
> GUAC_FILESYSTEM_NAME_LENGTH   5*



*and I have used   UTF-16 encoding in the following :-*


* guac_rdpdr_send_client_name_request(rdpdr, "Cloud Storage");    *

*to *

#define GUAC_DRIVE_NAME          "C\0l\0o\0u\0d\0
\0S\0t\0o\0r\0a\0g\0e\0\0\0"
#define GUAC_DRIVE_NAME_LENGTH   28

and used the above in the  *guac_rdpdr_send_client_name_request function .*


*Following is the output in the Windows and Linux RDP :- Please refer the
screenshots*









Thanks Nick for the helping me out .

Please look into it and suggest if there is any change required.


Thanks and regards,
Amarjeet Singh

On Mon, Feb 26, 2018 at 8:27 PM, Nick Couchman <vn...@apache.org> wrote:

>
>>
>>> It's interesting that XRDP is still clearly attempting to read things as
>>> UTF-16 here, but if that's failing for unmodified Guacamole, too, then it
>>> must be reading a field which we are not encoding as UTF-16 already (since
>>> the name of Guacamole's filesystem is definitely pre-encoded as UTF-16 at
>>> the moment). Perhaps we're wrong in the handling of whichever value is
>>> being used by XRDP, too?
>>>
>>>
>> I'm going to try to stand up a XRDP test server tomorrow and see if I can
>> test a few things and get some findings consistent with Amarjeet's
>> results.  This point actually puzzles me a little bit, particularly since
>> XRDP apparently works fine with xfreerdp, which does not UTF-16 encode its
>> filesystem name parameter.  Maybe with a few more test cases we can find
>> the illusive pattern.
>>
>> Or we'll just further confuse ourselves ;-).
>>
>> -Nick
>>
>
> It looks to me like xrdp just reads the "PreferredDosName" setting and
> doesn't even bother to try to enumerate the DeviceData:
>
> https://github.com/neutrinolabs/xrdp/blob/5daa09171e1e6e65a1
> a3ab969775fdf8affffc37/sesman/chansrv/devredir.c#L691
>
> In my testing, with my changes for GUACAMOLE-446, it doesn't matter what I
> set the name of the drive to in Guacamole, it always shows up as "GUAC" in
> the XRDP redirected filesystem directory.  I can't find the exact place in
> the guacd code where the PreferredDOSName field gets set, but it looks like
> maybe it just uses the GUAC_OS_TYPE define from rdpdr_messages.h:
>
> https://github.com/apache/guacamole-server/blob/bc5b01d4d8ab
> 0c3c89a08007316d33012261f6b3/src/protocols/rdp/guac_rdpdr/
> rdpdr_messages.h#L71
>
> ??  The PreferredDOSName field is supposed to be ASCII, 8 characters, at
> most, and *not* null-terminated...
>
> So, whatever changes get made in -446 should *not* adversely impact XRDP,
> as far as I can tell.  Also, I tested xfreerdp with xrdp, and, when you
> specify a filesytem name longer than 8 characters, it just truncates it at
> 8 ("temporary_files" turned into "temporar").  My guess is that xfreerdp is
> just taking the command line argument for the filesystem name and
> truncating it to 8 characters for the preferred DOS name.
>
> -Nick
>

Re: [jira] [Updated] (GUACAMOLE-512) Shared Drive redirection doesn't work with Ubuntu [ xrdp ]

Posted by Amarjeet Singh <am...@gmail.com>.
One more INFO I would like to share which is as follows :-

*Link target of that folder* : home/gk/.rdp_drive/CLOUD  { gk  is username
}

On Sat, Mar 3, 2018 at 6:52 PM, Amarjeet Singh <am...@gmail.com> wrote:

> I have seen one more folder with the name *Cloud Storage on 127.0.0.1*
> which is not accessible.
>
> Link to view the screenshot :-  https://www.dropbox.com/s/
>> t2emg56wxg0nito/linux_folders.PNG?dl=0
>
>
>
> Below is the error I got while opening the folder :- Refer the screenshot
>
>>
>> Link to view the  screenshot :   https://www.dropbox.com/s/
>> w11d1hj81gwazvs/error_linux.png?dl=0
>
>
>
> I have no idea about it.
>
> Regards,
> Amarjeet Singh
>
>
>
>
>
> On Sat, Mar 3, 2018 at 6:42 PM, Amarjeet Singh <am...@gmail.com>
> wrote:
>
>> Thanks Nick,
>>
>>
>> Below is the link to view the screenshot :-
>>
>> Windows  :   https://www.dropbox.com/s/97m3x94vewi4q2j/windows_device_
>> redirection.PNG?dl=0
>>
>> Linux : https://www.dropbox.com/s/x7mego94nduosbz/liux_device_redi
>> rection.PNG?dl=0
>>
>>>
>>> While the string apparently does not need to be UTF-16 encoded, it does
>>> need to be null-terminated, which you're missing, here.
>>
>>
>>
>> I will fix it.
>>
>>
>>>   On XRDP on Linux, you will not see this, as XRDP does not look at
>>> either the client name, nor the the filesystem name for presenting this
>>> share.
>>
>>
>> I am seeing the same . Please view the screenshots.
>>
>>
>> Regards,
>> Amarjeet Singh
>>
>>
>> On Sat, Mar 3, 2018 at 6:31 PM, Nick Couchman <vn...@apache.org> wrote:
>>
>>> On Sat, Mar 3, 2018 at 7:09 AM, Amarjeet Singh <am...@gmail.com>
>>> wrote:
>>>
>>>> Hi Team,
>>>>
>>>> I have done the following changes to fix the above issue which works
>>>> both in *Windows  *as well as *Linux RDP.*
>>>>
>>>>
>>>>>
>>>>> *#define GUAC_FILESYSTEM_NAME          "C\0L\0O\0U\0D\0\0\0"**#define
>>>>> GUAC_FILESYSTEM_NAME_LENGTH   12*
>>>>
>>>>
>>>>
>>>> *Instead of using above configurations I have used the following  (
>>>> No   UTF-16 encoding  is required  ) :-   *
>>>>
>>>>
>>>>> *#define GUAC_FILESYSTEM_NAME          "CLOUD"**#define
>>>>> GUAC_FILESYSTEM_NAME_LENGTH   5*
>>>>
>>>>
>>>>
>>>>
>>> While the string apparently does not need to be UTF-16 encoded, it does
>>> need to be null-terminated, which you're missing, here.
>>>
>>>
>>>> *and I have used   UTF-16 encoding in the following :-*
>>>>
>>>>
>>>> * guac_rdpdr_send_client_name_request(rdpdr, "Cloud Storage");    *
>>>>
>>>> *to *
>>>>
>>>> #define GUAC_DRIVE_NAME          "C\0l\0o\0u\0d\0
>>>> \0S\0t\0o\0r\0a\0g\0e\0\0\0"
>>>> #define GUAC_DRIVE_NAME_LENGTH   28
>>>>
>>>> and used the above in the  *guac_rdpdr_send_client_name_request
>>>> function .*
>>>>
>>>
>>> Note that the drive name and client name are *not* the same thing.  The
>>> client name is used for redirection, but is used in a broader sense to
>>> identify the client connecting to the server.  I don't know off the top of
>>> my head what the encoding should be for that, but probably UTF-16.
>>>
>>> Your screenshots did not come through, but the storage should show up as
>>> <Filesystem Name> on <Client Name>, so, in your case, you should see
>>> "Cloud" on "Cloud Storage" on Windows.  On XRDP on Linux, you will not see
>>> this, as XRDP does not look at either the client name, nor the the
>>> filesystem name for presenting this share.  Instead, there's a value
>>> determine on the XRDP side, either in the code or in a configuration file,
>>> for the name of the share, and then it uses the PreferredDosName setting
>>> for the folder name.  None of the changes you have done (nor the ones I
>>> have done in the pull request for the JIRA issue) will impact the way XRDP
>>> sees it, and this is not because of Guacamole, this is because of how the
>>> XRDP code handles it.
>>>
>>> -Nick
>>>
>>
>>
>

Re: [jira] [Updated] (GUACAMOLE-512) Shared Drive redirection doesn't work with Ubuntu [ xrdp ]

Posted by Nick Couchman <vn...@apache.org>.
On Sat, Mar 3, 2018 at 8:48 AM, Nick Couchman <ni...@gmail.com>
wrote:

> On Sat, Mar 3, 2018 at 8:22 AM, Amarjeet Singh <am...@gmail.com>
> wrote:
>
>> I have seen one more folder with the name *Cloud Storage on 127.0.0.1*
>> which is not accessible.
>>
>> Link to view the screenshot :-  https://www.dropbox.com/s/
>>> t2emg56wxg0nito/linux_folders.PNG?dl=0
>>
>>
>>
>> Below is the error I got while opening the folder :- Refer the screenshot
>>
>>>
>>> Link to view the  screenshot :   https://www.dropbox.com/s/w11
>>> d1hj81gwazvs/error_linux.png?dl=0
>>
>>
>>
>
What version of XRDP are you using, on what Linux distribution?

Also, could you test with an un-modified version of Guacamole and see if
the behavior is consistent?

-Nick

Re: [jira] [Updated] (GUACAMOLE-512) Shared Drive redirection doesn't work with Ubuntu [ xrdp ]

Posted by Nick Couchman <ni...@gmail.com>.
On Sat, Mar 3, 2018 at 8:22 AM, Amarjeet Singh <am...@gmail.com> wrote:

> I have seen one more folder with the name *Cloud Storage on 127.0.0.1*
> which is not accessible.
>
> Link to view the screenshot :-  https://www.dropbox.com/s/
>> t2emg56wxg0nito/linux_folders.PNG?dl=0
>
>
>
> Below is the error I got while opening the folder :- Refer the screenshot
>
>>
>> Link to view the  screenshot :   https://www.dropbox.com/s/
>> w11d1hj81gwazvs/error_linux.png?dl=0
>
>
>
I suspect these are specific to XRDP and how it behaves.  It could also be
the spaces in the folder names that it doesn't like - Linux hasn't always
been as friendly with spaces in folder names as it is, now, and sometimes
that still comes back to haunt us.

-Nick

Re: [jira] [Updated] (GUACAMOLE-512) Shared Drive redirection doesn't work with Ubuntu [ xrdp ]

Posted by Amarjeet Singh <am...@gmail.com>.
I have seen one more folder with the name *Cloud Storage on 127.0.0.1*
which is not accessible.

Link to view the screenshot :-
> https://www.dropbox.com/s/t2emg56wxg0nito/linux_folders.PNG?dl=0



Below is the error I got while opening the folder :- Refer the screenshot

>
> Link to view the  screenshot :
> https://www.dropbox.com/s/w11d1hj81gwazvs/error_linux.png?dl=0



I have no idea about it.

Regards,
Amarjeet Singh





On Sat, Mar 3, 2018 at 6:42 PM, Amarjeet Singh <am...@gmail.com> wrote:

> Thanks Nick,
>
>
> Below is the link to view the screenshot :-
>
> Windows  :   https://www.dropbox.com/s/97m3x94vewi4q2j/windows_
> device_redirection.PNG?dl=0
>
> Linux : https://www.dropbox.com/s/x7mego94nduosbz/liux_device_
> redirection.PNG?dl=0
>
>>
>> While the string apparently does not need to be UTF-16 encoded, it does
>> need to be null-terminated, which you're missing, here.
>
>
>
> I will fix it.
>
>
>>   On XRDP on Linux, you will not see this, as XRDP does not look at
>> either the client name, nor the the filesystem name for presenting this
>> share.
>
>
> I am seeing the same . Please view the screenshots.
>
>
> Regards,
> Amarjeet Singh
>
>
> On Sat, Mar 3, 2018 at 6:31 PM, Nick Couchman <vn...@apache.org> wrote:
>
>> On Sat, Mar 3, 2018 at 7:09 AM, Amarjeet Singh <am...@gmail.com>
>> wrote:
>>
>>> Hi Team,
>>>
>>> I have done the following changes to fix the above issue which works
>>> both in *Windows  *as well as *Linux RDP.*
>>>
>>>
>>>>
>>>> *#define GUAC_FILESYSTEM_NAME          "C\0L\0O\0U\0D\0\0\0"**#define
>>>> GUAC_FILESYSTEM_NAME_LENGTH   12*
>>>
>>>
>>>
>>> *Instead of using above configurations I have used the following  (  No
>>>  UTF-16 encoding  is required  ) :-   *
>>>
>>>
>>>> *#define GUAC_FILESYSTEM_NAME          "CLOUD"**#define
>>>> GUAC_FILESYSTEM_NAME_LENGTH   5*
>>>
>>>
>>>
>>>
>> While the string apparently does not need to be UTF-16 encoded, it does
>> need to be null-terminated, which you're missing, here.
>>
>>
>>> *and I have used   UTF-16 encoding in the following :-*
>>>
>>>
>>> * guac_rdpdr_send_client_name_request(rdpdr, "Cloud Storage");    *
>>>
>>> *to *
>>>
>>> #define GUAC_DRIVE_NAME          "C\0l\0o\0u\0d\0
>>> \0S\0t\0o\0r\0a\0g\0e\0\0\0"
>>> #define GUAC_DRIVE_NAME_LENGTH   28
>>>
>>> and used the above in the  *guac_rdpdr_send_client_name_request
>>> function .*
>>>
>>
>> Note that the drive name and client name are *not* the same thing.  The
>> client name is used for redirection, but is used in a broader sense to
>> identify the client connecting to the server.  I don't know off the top of
>> my head what the encoding should be for that, but probably UTF-16.
>>
>> Your screenshots did not come through, but the storage should show up as
>> <Filesystem Name> on <Client Name>, so, in your case, you should see
>> "Cloud" on "Cloud Storage" on Windows.  On XRDP on Linux, you will not see
>> this, as XRDP does not look at either the client name, nor the the
>> filesystem name for presenting this share.  Instead, there's a value
>> determine on the XRDP side, either in the code or in a configuration file,
>> for the name of the share, and then it uses the PreferredDosName setting
>> for the folder name.  None of the changes you have done (nor the ones I
>> have done in the pull request for the JIRA issue) will impact the way XRDP
>> sees it, and this is not because of Guacamole, this is because of how the
>> XRDP code handles it.
>>
>> -Nick
>>
>
>

Re: [jira] [Updated] (GUACAMOLE-512) Shared Drive redirection doesn't work with Ubuntu [ xrdp ]

Posted by Amarjeet Singh <am...@gmail.com>.
Hi Team,

Below is the code which is passing drive name to XRDP Version 0.9.5

File : */src/protocols/rdp/guac_rdpdr/rdpdr_fs_service.c*


>
>
>
>
>
>
>
>
>
>
*static void guac_rdpdr_device_fs_announce_handler(guac_rdpdr_device*
device,        wStream* output_stream, int device_id) {    /* Filesystem
header */    guac_client_log(device->rdpdr->client, GUAC_LOG_INFO, "Sending
filesystem");    Stream_Write_UINT32(output_stream,
RDPDR_DTYP_FILESYSTEM);    Stream_Write_UINT32(output_stream, device_id);
  Stream_Write(output_stream, "GUAC\0\0\0\0", 8); /* DOS name */    /*
Filesystem data */    Stream_Write_UINT32(output_stream,
GUAC_FILESYSTEM_NAME_LENGTH);    Stream_Write(output_stream,
GUAC_FILESYSTEM_NAME, GUAC_FILESYSTEM_NAME_LENGTH);}*
*@Nick, If i change it to "Cloud\0\0\0" It is sending Cloud .*


*Thanks and Regards,*
*Amarjeet Singh*

On Sat, Mar 10, 2018 at 10:45 PM, Amarjeet Singh <am...@gmail.com>
wrote:

> @Nick,
>
> Any idea  what parameter is sending to XRDP 0.9.5 as I tried to change
> the  GUAC_OS_TYPE from GUAC to CLOUD which doesn't make any difference.
>
> There might be another parameter which is passing to XRDP 0.9.5 and it
> displaying GUAC as a folder name .
>
>
> Regards,
> Amarjeet Singh
>
> On Mon, Mar 5, 2018 at 6:17 PM, Amarjeet Singh <am...@gmail.com>
> wrote:
>
>> Hi Nick,
>>
>> In my testing, with my changes for GUACAMOLE-446, it doesn't matter what
>>> I set the name of the drive to in Guacamole, it always shows up as "GUAC"
>>> in the XRDP redirected filesystem directory.  I can't find the exact place
>>> in the guacd code where the PreferredDOSName field gets set, but it looks
>>> like maybe it just uses the GUAC_OS_TYPE define from rdpdr_messages.h:
>>> https://github.com/apache/guacamole-server/blob/bc5b01d4d8ab
>>> 0c3c89a08007316d33012261f6b3/src/protocols/rdp/guac_rdpdr/rd
>>> pdr_messages.h#L71
>>
>>
>> I tried to change the GUAC_OS_TYPE from "GUAC" to "CLOUD"  but still it
>> is displaying the name GUAC in xrdp version *0.9.5*
>>
>> *Regards,*
>> *Amarjeet Singh*
>>
>> On Sun, Mar 4, 2018 at 8:20 AM, Nick Couchman <vn...@apache.org> wrote:
>>
>>> On Sat, Mar 3, 2018 at 9:23 AM, Amarjeet Singh <am...@gmail.com>
>>> wrote:
>>>
>>>> I have tested with xrdp version 0.9.5 and got the following :-
>>>>
>>>> Display name is *"GUAC*" as you have mentioned above.
>>>>
>>>> View the screenshot : https://www.dropbox.com/s/bp
>>>> sz633zt5tpfv3/xrdp_version_0.9.5.PNG?dl=0
>>>>
>>>>
>>> I suspect the 0.5.0 version you were using from Ubuntu was patched to
>>> include the filesystem name/label functionality rather than just using the
>>> PreferredDosName.
>>>
>>> -Nick
>>>
>>
>>
>

Re: [jira] [Updated] (GUACAMOLE-512) Shared Drive redirection doesn't work with Ubuntu [ xrdp ]

Posted by Amarjeet Singh <am...@gmail.com>.
@Nick,

Any idea  what parameter is sending to XRDP 0.9.5 as I tried to change
the  GUAC_OS_TYPE
from GUAC to CLOUD which doesn't make any difference.

There might be another parameter which is passing to XRDP 0.9.5 and it
displaying GUAC as a folder name .


Regards,
Amarjeet Singh

On Mon, Mar 5, 2018 at 6:17 PM, Amarjeet Singh <am...@gmail.com> wrote:

> Hi Nick,
>
> In my testing, with my changes for GUACAMOLE-446, it doesn't matter what I
>> set the name of the drive to in Guacamole, it always shows up as "GUAC" in
>> the XRDP redirected filesystem directory.  I can't find the exact place in
>> the guacd code where the PreferredDOSName field gets set, but it looks like
>> maybe it just uses the GUAC_OS_TYPE define from rdpdr_messages.h:
>> https://github.com/apache/guacamole-server/blob/bc5b01d4d8ab
>> 0c3c89a08007316d33012261f6b3/src/protocols/rdp/guac_rdpdr/rd
>> pdr_messages.h#L71
>
>
> I tried to change the GUAC_OS_TYPE from "GUAC" to "CLOUD"  but still it is
> displaying the name GUAC in xrdp version *0.9.5*
>
> *Regards,*
> *Amarjeet Singh*
>
> On Sun, Mar 4, 2018 at 8:20 AM, Nick Couchman <vn...@apache.org> wrote:
>
>> On Sat, Mar 3, 2018 at 9:23 AM, Amarjeet Singh <am...@gmail.com>
>> wrote:
>>
>>> I have tested with xrdp version 0.9.5 and got the following :-
>>>
>>> Display name is *"GUAC*" as you have mentioned above.
>>>
>>> View the screenshot : https://www.dropbox.com/s/bp
>>> sz633zt5tpfv3/xrdp_version_0.9.5.PNG?dl=0
>>>
>>>
>> I suspect the 0.5.0 version you were using from Ubuntu was patched to
>> include the filesystem name/label functionality rather than just using the
>> PreferredDosName.
>>
>> -Nick
>>
>
>

Re: [jira] [Updated] (GUACAMOLE-512) Shared Drive redirection doesn't work with Ubuntu [ xrdp ]

Posted by Amarjeet Singh <am...@gmail.com>.
Hi Nick,

In my testing, with my changes for GUACAMOLE-446, it doesn't matter what I
> set the name of the drive to in Guacamole, it always shows up as "GUAC" in
> the XRDP redirected filesystem directory.  I can't find the exact place in
> the guacd code where the PreferredDOSName field gets set, but it looks like
> maybe it just uses the GUAC_OS_TYPE define from rdpdr_messages.h:
> https://github.com/apache/guacamole-server/blob/bc5b01d4d8ab
> 0c3c89a08007316d33012261f6b3/src/protocols/rdp/guac_rdpdr/
> rdpdr_messages.h#L71


I tried to change the GUAC_OS_TYPE from "GUAC" to "CLOUD"  but still it is
displaying the name GUAC in xrdp version *0.9.5*

*Regards,*
*Amarjeet Singh*

On Sun, Mar 4, 2018 at 8:20 AM, Nick Couchman <vn...@apache.org> wrote:

> On Sat, Mar 3, 2018 at 9:23 AM, Amarjeet Singh <am...@gmail.com>
> wrote:
>
>> I have tested with xrdp version 0.9.5 and got the following :-
>>
>> Display name is *"GUAC*" as you have mentioned above.
>>
>> View the screenshot : https://www.dropbox.com/s/bp
>> sz633zt5tpfv3/xrdp_version_0.9.5.PNG?dl=0
>>
>>
> I suspect the 0.5.0 version you were using from Ubuntu was patched to
> include the filesystem name/label functionality rather than just using the
> PreferredDosName.
>
> -Nick
>

Re: [jira] [Updated] (GUACAMOLE-512) Shared Drive redirection doesn't work with Ubuntu [ xrdp ]

Posted by Nick Couchman <vn...@apache.org>.
On Sat, Mar 3, 2018 at 9:23 AM, Amarjeet Singh <am...@gmail.com> wrote:

> I have tested with xrdp version 0.9.5 and got the following :-
>
> Display name is *"GUAC*" as you have mentioned above.
>
> View the screenshot : https://www.dropbox.com/s/
> bpsz633zt5tpfv3/xrdp_version_0.9.5.PNG?dl=0
>
>
I suspect the 0.5.0 version you were using from Ubuntu was patched to
include the filesystem name/label functionality rather than just using the
PreferredDosName.

-Nick

Re: [jira] [Updated] (GUACAMOLE-512) Shared Drive redirection doesn't work with Ubuntu [ xrdp ]

Posted by Amarjeet Singh <am...@gmail.com>.
I have tested with xrdp version 0.9.5 and got the following :-

Display name is *"GUAC*" as you have mentioned above.

View the screenshot :
https://www.dropbox.com/s/bpsz633zt5tpfv3/xrdp_version_0.9.5.PNG?dl=0

Regards,
Amarjeet Singh

On Sat, Mar 3, 2018 at 7:35 PM, Amarjeet Singh <am...@gmail.com> wrote:

> @Nick, Below is the *INFO :-*
>
>
>> What version of XRDP are you using, on what Linux distribution?
>
>
> Linux distribution  : Ubuntu 16.04.3 x64
> XRDP version : xrdp 0.5
>
>
>
>> Also, could you test with an un-modified version of Guacamole and see if
>> the behavior is consistent?
>
> Maybe you could try with a more modern version of XRDP?
>
>
> I will test and update you the same.
>
>
>
> On Sat, Mar 3, 2018 at 7:21 PM, Nick Couchman <vn...@apache.org> wrote:
>
>> On Sat, Mar 3, 2018 at 8:47 AM, Amarjeet Singh <am...@gmail.com>
>> wrote:
>>
>>> @Nick xrdp Version is 0.5.0
>>>
>>>
>> Oh, my.  That is quite old.  Current version of XRDP is 0.9.5, and that
>> is available at least in the EPEL repository for RH/CentOS 7 (EL7), and I
>> would be surprised if it isn't available for other distributions.  Maybe
>> you could try with a more modern version of XRDP?
>>
>> -Nick
>>
>
>

Re: [jira] [Updated] (GUACAMOLE-512) Shared Drive redirection doesn't work with Ubuntu [ xrdp ]

Posted by Amarjeet Singh <am...@gmail.com>.
 @Nick, Below is the *INFO :-*


> What version of XRDP are you using, on what Linux distribution?


Linux distribution  : Ubuntu 16.04.3 x64
XRDP version : xrdp 0.5



> Also, could you test with an un-modified version of Guacamole and see if
> the behavior is consistent?

Maybe you could try with a more modern version of XRDP?


I will test and update you the same.



On Sat, Mar 3, 2018 at 7:21 PM, Nick Couchman <vn...@apache.org> wrote:

> On Sat, Mar 3, 2018 at 8:47 AM, Amarjeet Singh <am...@gmail.com>
> wrote:
>
>> @Nick xrdp Version is 0.5.0
>>
>>
> Oh, my.  That is quite old.  Current version of XRDP is 0.9.5, and that is
> available at least in the EPEL repository for RH/CentOS 7 (EL7), and I
> would be surprised if it isn't available for other distributions.  Maybe
> you could try with a more modern version of XRDP?
>
> -Nick
>

Re: [jira] [Updated] (GUACAMOLE-512) Shared Drive redirection doesn't work with Ubuntu [ xrdp ]

Posted by Nick Couchman <vn...@apache.org>.
On Sat, Mar 3, 2018 at 8:47 AM, Amarjeet Singh <am...@gmail.com> wrote:

> @Nick xrdp Version is 0.5.0
>
>
Oh, my.  That is quite old.  Current version of XRDP is 0.9.5, and that is
available at least in the EPEL repository for RH/CentOS 7 (EL7), and I
would be surprised if it isn't available for other distributions.  Maybe
you could try with a more modern version of XRDP?

-Nick

Re: [jira] [Updated] (GUACAMOLE-512) Shared Drive redirection doesn't work with Ubuntu [ xrdp ]

Posted by Amarjeet Singh <am...@gmail.com>.
@Nick xrdp Version is 0.5.0

On Sat, Mar 3, 2018 at 7:08 PM, Nick Couchman <vn...@apache.org> wrote:

>
>>>
>>>   On XRDP on Linux, you will not see this, as XRDP does not look at
>>> either the client name, nor the the filesystem name for presenting this
>>> share.
>>
>>
>> I am seeing the same . Please view the screenshots.
>>
>
> Interesting.  Perhaps the version of XRDP you are using has been patched
> to support it.  The Github source code I looked at and the version I used
> (EPEL 7 repo) did not behave this way.  In any case, this is dependent on
> XRDP and how it behaves, and not Guacamole.  Whatever version you are using
> is clearly okay with the lack of UTF-16 encoding, so it looks like they
> have implemented it in a way consistent with other RDP clients and servers.
>
> -Nick
>

Re: [jira] [Updated] (GUACAMOLE-512) Shared Drive redirection doesn't work with Ubuntu [ xrdp ]

Posted by Nick Couchman <vn...@apache.org>.
>
>
>>
>>   On XRDP on Linux, you will not see this, as XRDP does not look at
>> either the client name, nor the the filesystem name for presenting this
>> share.
>
>
> I am seeing the same . Please view the screenshots.
>

Interesting.  Perhaps the version of XRDP you are using has been patched to
support it.  The Github source code I looked at and the version I used
(EPEL 7 repo) did not behave this way.  In any case, this is dependent on
XRDP and how it behaves, and not Guacamole.  Whatever version you are using
is clearly okay with the lack of UTF-16 encoding, so it looks like they
have implemented it in a way consistent with other RDP clients and servers.

-Nick

Re: [jira] [Updated] (GUACAMOLE-512) Shared Drive redirection doesn't work with Ubuntu [ xrdp ]

Posted by Amarjeet Singh <am...@gmail.com>.
Thanks Nick,


Below is the link to view the screenshot :-

Windows  :
https://www.dropbox.com/s/97m3x94vewi4q2j/windows_device_redirection.PNG?dl=0

Linux :
https://www.dropbox.com/s/x7mego94nduosbz/liux_device_redirection.PNG?dl=0

>
> While the string apparently does not need to be UTF-16 encoded, it does
> need to be null-terminated, which you're missing, here.



I will fix it.


>   On XRDP on Linux, you will not see this, as XRDP does not look at
> either the client name, nor the the filesystem name for presenting this
> share.


I am seeing the same . Please view the screenshots.


Regards,
Amarjeet Singh


On Sat, Mar 3, 2018 at 6:31 PM, Nick Couchman <vn...@apache.org> wrote:

> On Sat, Mar 3, 2018 at 7:09 AM, Amarjeet Singh <am...@gmail.com>
> wrote:
>
>> Hi Team,
>>
>> I have done the following changes to fix the above issue which works both
>> in *Windows  *as well as *Linux RDP.*
>>
>>
>>>
>>> *#define GUAC_FILESYSTEM_NAME          "C\0L\0O\0U\0D\0\0\0"**#define
>>> GUAC_FILESYSTEM_NAME_LENGTH   12*
>>
>>
>>
>> *Instead of using above configurations I have used the following  (  No
>>  UTF-16 encoding  is required  ) :-   *
>>
>>
>>> *#define GUAC_FILESYSTEM_NAME          "CLOUD"**#define
>>> GUAC_FILESYSTEM_NAME_LENGTH   5*
>>
>>
>>
>>
> While the string apparently does not need to be UTF-16 encoded, it does
> need to be null-terminated, which you're missing, here.
>
>
>> *and I have used   UTF-16 encoding in the following :-*
>>
>>
>> * guac_rdpdr_send_client_name_request(rdpdr, "Cloud Storage");    *
>>
>> *to *
>>
>> #define GUAC_DRIVE_NAME          "C\0l\0o\0u\0d\0
>> \0S\0t\0o\0r\0a\0g\0e\0\0\0"
>> #define GUAC_DRIVE_NAME_LENGTH   28
>>
>> and used the above in the  *guac_rdpdr_send_client_name_request function
>> .*
>>
>
> Note that the drive name and client name are *not* the same thing.  The
> client name is used for redirection, but is used in a broader sense to
> identify the client connecting to the server.  I don't know off the top of
> my head what the encoding should be for that, but probably UTF-16.
>
> Your screenshots did not come through, but the storage should show up as
> <Filesystem Name> on <Client Name>, so, in your case, you should see
> "Cloud" on "Cloud Storage" on Windows.  On XRDP on Linux, you will not see
> this, as XRDP does not look at either the client name, nor the the
> filesystem name for presenting this share.  Instead, there's a value
> determine on the XRDP side, either in the code or in a configuration file,
> for the name of the share, and then it uses the PreferredDosName setting
> for the folder name.  None of the changes you have done (nor the ones I
> have done in the pull request for the JIRA issue) will impact the way XRDP
> sees it, and this is not because of Guacamole, this is because of how the
> XRDP code handles it.
>
> -Nick
>

Re: [jira] [Updated] (GUACAMOLE-512) Shared Drive redirection doesn't work with Ubuntu [ xrdp ]

Posted by Nick Couchman <vn...@apache.org>.
On Sat, Mar 3, 2018 at 7:09 AM, Amarjeet Singh <am...@gmail.com> wrote:

> Hi Team,
>
> I have done the following changes to fix the above issue which works both
> in *Windows  *as well as *Linux RDP.*
>
>
>>
>> *#define GUAC_FILESYSTEM_NAME          "C\0L\0O\0U\0D\0\0\0"**#define
>> GUAC_FILESYSTEM_NAME_LENGTH   12*
>
>
>
> *Instead of using above configurations I have used the following  (  No
>  UTF-16 encoding  is required  ) :-   *
>
>
>> *#define GUAC_FILESYSTEM_NAME          "CLOUD"**#define
>> GUAC_FILESYSTEM_NAME_LENGTH   5*
>
>
>
>
While the string apparently does not need to be UTF-16 encoded, it does
need to be null-terminated, which you're missing, here.


> *and I have used   UTF-16 encoding in the following :-*
>
>
> * guac_rdpdr_send_client_name_request(rdpdr, "Cloud Storage");    *
>
> *to *
>
> #define GUAC_DRIVE_NAME          "C\0l\0o\0u\0d\0
> \0S\0t\0o\0r\0a\0g\0e\0\0\0"
> #define GUAC_DRIVE_NAME_LENGTH   28
>
> and used the above in the  *guac_rdpdr_send_client_name_request function
> .*
>

Note that the drive name and client name are *not* the same thing.  The
client name is used for redirection, but is used in a broader sense to
identify the client connecting to the server.  I don't know off the top of
my head what the encoding should be for that, but probably UTF-16.

Your screenshots did not come through, but the storage should show up as
<Filesystem Name> on <Client Name>, so, in your case, you should see
"Cloud" on "Cloud Storage" on Windows.  On XRDP on Linux, you will not see
this, as XRDP does not look at either the client name, nor the the
filesystem name for presenting this share.  Instead, there's a value
determine on the XRDP side, either in the code or in a configuration file,
for the name of the share, and then it uses the PreferredDosName setting
for the folder name.  None of the changes you have done (nor the ones I
have done in the pull request for the JIRA issue) will impact the way XRDP
sees it, and this is not because of Guacamole, this is because of how the
XRDP code handles it.

-Nick