From unknown Sat Apr 04 16:33:24 2026
X-Loop: owner@bugs.x2go.org
Subject: Bug#834: defaults.py X2GOBROKER_SESSIONPROFILE_DEFAULTS dpi prevents client from using autodetected dpi
Reply-To: Jason Alavaliant <alavaliant@ra09.com>, 834@bugs.x2go.org
Resent-From: Jason Alavaliant <alavaliant@ra09.com>
Resent-To: x2go-dev@lists.x2go.org
Resent-CC: X2Go Developers <x2go-dev@lists.x2go.org>
X-Loop: owner@bugs.x2go.org
Resent-Date: Wed, 01 Apr 2015 22:15:02 +0000
Resent-Message-ID: <handler.834.B.142792645624743@bugs.x2go.org>
Resent-Sender: owner@bugs.x2go.org
X-X2Go-PR-Message: report 834
X-X2Go-PR-Package: python-x2gobroker
X-X2Go-PR-Keywords: patch
Received: via spool by submit@bugs.x2go.org id=B.142792645624743
          (code B); Wed, 01 Apr 2015 22:15:02 +0000
Received: (at submit) by bugs.x2go.org; 1 Apr 2015 22:14:16 +0000
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
	ymir.das-netzwerkteam.de
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,URIBL_BLOCKED
	autolearn=ham version=3.3.2
Received: from thetower.ra09.com (ra09.com [202.124.104.240])
	by ymir.das-netzwerkteam.de (Postfix) with ESMTPS id 4B7045DAD1
	for <submit@bugs.x2go.org>; Thu,  2 Apr 2015 00:14:13 +0200 (CEST)
Received: from localhost ([127.0.0.1] helo=private.ra09.com)
	by thetower.ra09.com with esmtp (Exim 4.80)
	(envelope-from <alavaliant@ra09.com>)
	id 1YdQtk-0001j3-Hf
	for submit@bugs.x2go.org; Thu, 02 Apr 2015 11:14:09 +1300
MIME-Version: 1.0
Content-Type: multipart/mixed;
 boundary="=_eddaa18bf6593b5f5e3feb4c16333aaa"
Date: Thu, 02 Apr 2015 11:14:08 +1300
From: Jason Alavaliant <alavaliant@ra09.com>
To: submit@bugs.x2go.org
Message-ID: <fa9274334eaba52e9410ae25b4946eb2@private.ra09.com>
X-Sender: alavaliant@ra09.com
User-Agent: Roundcube Webmail/1.0.5

--=_eddaa18bf6593b5f5e3feb4c16333aaa
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII;
 format=flowed

Package: python-x2gobroker
Version: 0.0.2.3
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 
set);

* 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).

Thanks
Jason
--=_eddaa18bf6593b5f5e3feb4c16333aaa
Content-Transfer-Encoding: base64
Content-Type: text/x-diff;
 name=defaults-remove-dpi.patch
Content-Disposition: attachment;
 filename=defaults-remove-dpi.patch;
 size=344

LS0tIG9sZC94MmdvYnJva2VyL2RlZmF1bHRzLnB5CTIwMTUtMDQtMDIgMTE6MDk6MTYuODA2OTAx
Nzc5ICsxMzAwCisrKyBuZXcveDJnb2Jyb2tlci9kZWZhdWx0cy5weQkyMDE1LTA0LTAyIDExOjA5
OjI0LjM0MzA2NDkzNiArMTMwMApAQCAtMjAyLDcgKzIwMiw2IEBACiAgICAgICAgIHUncm9vdGxl
c3MnOiBUcnVlLAogICAgICAgICB1J2ljb252dG8nOiB1J1VURi04JywKICAgICAgICAgdSdzb3Vu
ZHR1bm5lbCc6IFRydWUsCi0gICAgICAgIHUnZHBpJzogOTYsCiAgICAgICAgIHUnc3NocG9ydCc6
IDIyLAogICAgICAgICB1J3NldGRwaSc6IDAsCiAgICAgICAgIHUncGFjayc6IHUnMTZtLWpwZWcn
LAo=
--=_eddaa18bf6593b5f5e3feb4c16333aaa--
