[X2Go-Dev] Bug#836: Bug#836: defaults.py X2GOBROKER_SESSIONPROFILE_DEFAULTS height/width/fullscreen values prevents client from setting initial geometry on startup

Mike Gabriel mike.gabriel at das-netzwerkteam.de
Mon Apr 6 22:35:27 CEST 2015


Hi Jason,

thanks for your feedback on the broker.

On  Sa 04 Apr 2015 11:01:27 CEST, Jason Alavaliant wrote:

> Package: python-x2gobroker
> Version: 0.0.3.0
>
> In the same vein as the dpi issue noted in bug #834 the presence of  
> default values for height, width and fullscreen in the  
> /usr/lib/python2.7/dist-packages/x2gobroker/defaults.py   file under  
> theX2GOBROKER_SESSIONPROFILE_DEFAULTS    section prevent the  
> x2goclient --geometry option being used to set what default geometry  
> size (or if to use fullscreen) to be set by the client even if the  
> admin of the x2gobroker setup hasn't defined those values in the  
> x2gobroker-sessionprofiles.conf file.
>
> I'd suggest updating the  
> /usr/lib/python2.7/dist-packages/x2gobroker/defaults.py file to  
> remove the lines
> "u'height': 600,"
> "u'fullscreen': False,"
> "u'width': 800,"
> from the X2GOBROKER_SESSIONPROFILE_DEFAULTS section.
>
> In my testing with those default value gone;
>
> * If a height/width/fullscreen values are set in  
> x2gobroker-sessionprofiles.conf (which is the default provided in  
> the sample config file), then those values are used by the session  
> overriding whatever the client has set as it's geometry option.
> * If the values aren't set in x2gobroker-sessionprofiles.conf  and a  
> --geometry command line argument ISN'T provided to the client then  
> the x2goclient defaults of height=600, width=800, fullscreen=False  
> are used resulting in the same behaviour as if the defaults  
> previously defined in defaults.py were still present.
> *  If the values aren't set in x2gobroker-sessionprofiles.conf  and  
> a --geometry command line argument IS provided to the client it is  
> then used and the user running the x2goclient can pick their own  
> initial geometry to start with.
>
> So in default cases having that default value removed shouldn't  
> change behavior and it would allow people to configure their  
> starting geometry if the x2gobroker admin has permitted it by not  
> providing overriding values in the x2gobroker-sessionprofiles.conf  
> file.

The issue goes deeper, I guess.

When fixing #834 [1] I did not take into account, that the session  
profile default values defined in defaults.py also have another  
context. The X2GOBROKER_SESSIONPROFILE_DEFAULTS dict also implicitly  
provides information about the type for each value (int, str, bool).

So simply commenting them out is not a solution.

Furthermore, my idea is to provide a special value in  
x2gobroker-sessionprofiles.conf, i.e.,

   fullscreen=not-set
   dpi=not-set

etc.

If the admin uses those option for configuration, the broker will  
simply hide those session profile options when handing the session  
profile over to the client.

What do you think of that alternative approach?

Mike

[1] http://bugs.x2go.org/834
-- 

DAS-NETZWERKTEAM
mike gabriel, herweg 7, 24357 fleckeby
fon: +49 (1520) 1976 148

GnuPG Key ID 0x25771B31
mail: mike.gabriel at das-netzwerkteam.de, http://das-netzwerkteam.de

freeBusy:
https://mail.das-netzwerkteam.de/freebusy/m.gabriel%40das-netzwerkteam.de.xfb
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: Digitale PGP-Signatur
URL: <http://lists.x2go.org/pipermail/x2go-dev/attachments/20150406/4733044c/attachment.pgp>


More information about the x2go-dev mailing list