[X2Go-Dev] Bug#834: defaults.py X2GOBROKER_SESSIONPROFILE_DEFAULTS dpi prevents client from using autodetected dpi

Jason Alavaliant alavaliant at ra09.com
Thu Apr 2 00:14:08 CEST 2015

Package: python-x2gobroker
Tags: patch

It was noted by my users that their x2go sessions started via the broker 
always got the default dpi setting of 96 instead of the dpi value native 
to their machine.     Tracing through the code as far as I can see the 
problem is that if the /etc/x2go/broker/x2gobroker-sessionprofiles.conf  
  file doesn't have a dpi=  setting defined in it  the default one is 
provided by the value in the 
/usr/lib/python2.7/dist-packages/x2gobroker/defaults.py   file under 
X2GOBROKER_SESSIONPROFILE_DEFAULTS        that's not ideal since it 
stops the client from supplying it's autodetected one which matches the 
actual dpi on the user's machine.

I'd suggest updating the 
/usr/lib/python2.7/dist-packages/x2gobroker/defaults.py file to remove 
the line "u'dpi': 96,"  from the X2GOBROKER_SESSIONPROFILE_DEFAULTS 
section  (as per the attached patch).

In my testing with that default value gone (assuming that setdpi=1 is 

* If a dpi=num value is set in x2gobroker-sessionprofiles.conf (which is 
the default provided in the sample config file), then that 
sessionprofile set dpi value is used by the session.
* If there is no dpi=num value set in x2gobroker-sessionprofiles.conf  
then that the x2goclient provides it's own value which is either the 
autodetected value matching the dpi of the machine that is being 
connected from or the client falls back to it's default value which is 
also 96

So as far is I can see in default cases having that default value 
removed shouldn't change behavior and it would allow people optionally 
configure their sessionprofiles to have no dpi value set so broker 
sessions would be free to use the native dpi value provided by the 
client (which doesn't seem to be possible currently due to the default 
overriding the client providing it's own value).

-------------- next part --------------
A non-text attachment was scrubbed...
Name: defaults-remove-dpi.patch
Type: text/x-diff
Size: 344 bytes
Desc: not available
URL: <http://lists.x2go.org/pipermail/x2go-dev/attachments/20150402/f9de5394/attachment.patch>

More information about the x2go-dev mailing list