Bug 31717 - Passing additional parameters to RDP sessions not possible
Passing additional parameters to RDP sessions not possible
Status: CLOSED FIXED
Product: Z_Univention Corporate Client (UCC)
Classification: Unclassified
Component: Terminal services
unspecified
Other Linux
: P5 normal
: UCC 2.0
Assigned To: Moritz Muehlenhoff
Erik Damrose
: interim-3
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-11 15:55 CEST by Jan Christoph Ebersbach
Modified: 2014-06-12 09:19 CEST (History)
4 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments
Fix RDP parameter handling (690 bytes, patch)
2013-06-11 15:55 CEST, Jan Christoph Ebersbach
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Christoph Ebersbach univentionstaff 2013-06-11 15:55:41 CEST
Created attachment 5273 [details]
Fix RDP parameter handling

It's not possible to pass additional parameters to an RDP session via UCR variable rdp/additionaloptions.  In this case I tried to enable the background wallpaper by appending the "-x 0" parameter.

Currently, there are two issue.  First, parameters are append after the final "--" and are therefore treated as destination server.  Second, the parameters are enclosed in quotes and therefore treated as one option which causes xfreerdp to throw an error message and quit for any combination other than a single switch like -z.
Comment 1 Erik Damrose univentionstaff 2013-06-12 13:48:55 CEST
(In reply to Jan Christoph Ebersbach from comment #0)
> parameters are append after the final "--" and are therefore treated as 
> destination server.  
Did you test this further (bash -x)? The actual call from the RDP session script is 
/usr/bin/xfreerdp "${params[@]}" $server
while rdp/additionaloptions is part of the params array. The second issue is existent.
Comment 2 Jan Christoph Ebersbach univentionstaff 2013-06-12 13:53:57 CEST
(In reply to Erik Damrose from comment #1)
> (In reply to Jan Christoph Ebersbach from comment #0)
> > parameters are append after the final "--" and are therefore treated as 
> > destination server.  
> Did you test this further (bash -x)? The actual call from the RDP session
> script is 
> /usr/bin/xfreerdp "${params[@]}" $server
> while rdp/additionaloptions is part of the params array. The second issue is
> existent.

Yes, I investigated the issue by sending the final command to logger and it turned out that the -x 0 parameter ended up behind --, right before the destination server.  The session quit immediately.  Even if the parameter would be moved before -- it wouldn't work, because the last plugin parameter treats every following parameter as directory.  Only after moving params before the last plugin it finally worked.
Comment 3 Moritz Muehlenhoff univentionstaff 2013-06-19 10:16:24 CEST
I think the patch is only a workaround, not a proper fix.

The handling of positional arguments in xfreerdp is quite tricky and was tested with several combinations and parameters. If there are argument, which require a different position, we might need a second UCR variable.
Comment 4 Moritz Muehlenhoff univentionstaff 2013-12-16 12:33:23 CET
Before checking the patch the behaviour with the new freerdp should be tested.
Comment 5 Moritz Muehlenhoff univentionstaff 2014-05-19 09:34:32 CEST
The patch has been merged.
Comment 6 Erik Damrose univentionstaff 2014-05-20 11:14:13 CEST
OK, works fine. Tested with -T test to set the rdp session window title
Comment 7 Moritz Muehlenhoff univentionstaff 2014-06-12 09:19:51 CEST
UCC 2.0 has been released:
 http://docs.univention.de/release-notes-ucc-2.0.html

If this error occurs again, please use "Clone This Bug".