Discussion:
[X2Go-User] Windows x2go client displays at incorrect resolution
Davis, Jean-Paul
2017-04-02 20:01:13 UTC
Permalink
I'm hoping that someone out there with more experience will be able to solve this problem!



Server = RHEL 7, running local GNOME-3 session at native 3840x2160 (dpi 149) of attached 4K display Installed Packages:

x2goagent.x86_64 3.5.0.32-3.el7 @epel

x2goclient.x86_64 4.1.0.0-1.el7 @epel-rhel-x86_64-workstation-7

x2goserver.x86_64 4.0.1.20-1.el7 @epel

x2goserver-xsession.x86_64 4.0.1.20-1.el7 @epel

Settings:

/etc/x2go/x2go-agent.options - commented out X2GO_NXAGENT_DEFAULT_OPTIONS+=" -extension XFIXES"

/etc/x2go/Xresources - set Xft.dpi: 192

Everything else left at defaults



Client = Windows 10, x2go client v4.1.0.0, local native display 2560x1440 (dpi 192)

Settings:

Session Type = MATE (automatically changes to "Custom desktop" with command "MATE") Display = Fullscreen Set display DPI = 192



The session starts just fine, filling the screen with the MATE desktop, except that the display resolution is incorrect... with following information obtained inside a MATE terminal:

jpdavis: xdpyinfo | grep dots

resolution: 192x193 dots per inch

jpdavis: ps -waux | grep $DISPLAY | grep x2goagent

jpdavis 28204 0.2 0.3 217268 57696 ? S 10:05 0:08 /usr/lib64/nx/../x2go/bin/x2goagent -nolisten tcp -nolisten tcp -dpi 192 -D -auth /home/jpdavis/.Xauthority -name X2GO-jpdavis-50-1491062721_stDMATE_dp32 :50

jpdavis: xrandr --prop

xrandr: Failed to get size of gamma for output default Screen 0: minimum 320 x 240, current 1280 x 720, maximum 1920 x 1200 default connected 1280x720+0+0 0mm x 0mm



Thus the actual dpi being used by the display is 192*1280/2560 = 96, not the 192 sent to x2goagent and reported by xdpyinfo.



attempting to change the resolution from inside the session...

xrandr --size 1920x1200 works but keeps same actual dpi of 96 (so desktop is larger than my screen)

MATE Settings->Hardware->Displays returns error "RANDR extension is too old (must be at least 1.3)"

xrandr --version returns

xrandr program version 1.4.3

Server reports RandR version 1.2



I get the same behavior if I try sessions with KDE or XFCE instead of MATE.



Since the maximum resolution reported by xrandr corresponds to dpi of 192*1920/2560=144 x 192*1200/1440=160, I wondered if it had something to do with the local X session on the server which is at 149 dpi; closing that session, however, makes no difference. Could it be something about the X server that is running on the x2go server? (It is running but with no sessions, just the login greeter).



The Windows client generates the following in the file .x2go\<session>\sessions:

Loop: WARNING! Unrecognized session type 'unix-kde-depth_32'. Assuming agent session.

Auth: WARNING! Failed to read data from the X auth command.

Auth: WARNING! Generating a fake cookie for X authentication.

Loop: WARNING! Could not retrieve the X server authentication cookie.

Fork: WARNING! Function fork failed. Error is 11 'Resource temporarily unavailable'. Retrying...

Fork: WARNING! Function fork failed. Error is 11 'Resource temporarily unavailable'. Retrying...

Fork: WARNING! Function fork failed. Error is 11 'Resource temporarily unavailable'. Retrying...



... and the following in the file .x2go\<session>\options:

nx/nx,root=/cygdrive/C/Users/jpdavis/X2GO~1,connect=localhost,cookie=6f9207806bc4e3206aa5df26759c77bc,port=60732,errors=/cygdrive/C/Users/jpdavis/X2GO~1/S-JPDA~1/sessions:50



Where could it be getting a session type of 'unix-kde-depth_32' when I've set it to use a MATE session? And where exactly do I find the /cygdrive/C/Users/jpdavis/X2GO~1 directory on my Windows machine? I can't find any files where x2go client saves program preferences or session preferences.



Under the client settings, I changed to "use custom X server", pointed to the VcXsrv.exe file that comes with x2go, added "-dpi 192" to the command-line options for all cases, and restarted x2go. This had no effect. I also tried using the XMing X server with the same options, this also had no effect.



More interesting information...



If I simply Putty ssh to the server and run xrandr I get "Can't open display."



If I enable X11 forwarding in Putty but don't start a local X server on the Windows machine, then xrandr returns slightly more information: "Can't open display 134.253.62.153:10.0."



If I do this again but first start VcXsrv with the same command-line options as I've set in x2go ("C:\Program Files (x86)\x2goclient\VcXsrv\vcxsrv.exe" -fullscreen -notrayicon -clipboard -dpi 192) then xrandr returns "Screen 0: minimum 0 x 0, current 1280 x 720, maximum 4096 x 4096" (and xdpyinfo still says "192x193 dots per inch"). If I also add the command-line options "-screen 0 2056x1440", I get that resolution but much larger than my real display, and text is even larger.



Finally, I tried using Putty X11 forwarding with XMing, with XMing options set via it's XLaunch executable. With XMing set to fullscreen and no additional options passed, xdpyinfo says "75x75 dots per inch" and xrandr returns "Screen 0: minimum 1280 x 720, current 1280 x 720, maximum 1280 x 72." Same result with XMing set to multiple windows. In this mode, graphical applications started from inside Putty actually don't look bad (normal text size). Adding command line option "-dpi 192" to XMing makes xdpyinfo return "192x193 dots per inch" but xrandr output remains the same, and the resulting graphical application text is way too large.



Using XMing with Putty and X11 forwarding to start mate-session has the same issue, so I guess this is not actually an x2go problem. I'm still posting here in case someone can help, maybe I'll also look for user mail lists relevant to X in general, or VcXsrv/XMing.



So what am I missing? Where is it getting the dpi=96 that the display is actually using? The 96 value makes the session fairly useless, as all display elements are huge compared to the screen. I had this working not that long ago, but I wouldn't be able to confirm exactly what changes have been made in the interim because I don't recall exactly _when_ it was working.



Jean-Paul Davis
Ulrich Sibiller
2017-04-03 07:27:03 UTC
Permalink
Post by Davis, Jean-Paul
Client = Windows 10, x2go client v4.1.0.0, local native display 2560x1440 (dpi 192)
Session Type = MATE (automatically changes to “Custom desktop” with command
“MATE”) Display = Fullscreen Set display DPI = 192
The session starts just fine, filling the screen with the MATE desktop,
except that the display resolution is incorrect… with following information
jpdavis: xdpyinfo | grep dots
resolution: 192x193 dots per inch
jpdavis: ps -waux | grep $DISPLAY | grep x2goagent
jpdavis 28204 0.2 0.3 217268 57696 ? S 10:05 0:08
/usr/lib64/nx/../x2go/bin/x2goagent -nolisten tcp -nolisten tcp -dpi 192 -D
-auth /home/jpdavis/.Xauthority -name
X2GO-jpdavis-50-1491062721_stDMATE_dp32 :50
jpdavis: xrandr --prop
xrandr: Failed to get size of gamma for output default Screen 0: minimum 320
x 240, current 1280 x 720, maximum 1920 x 1200 default connected
1280x720+0+0 0mm x 0mm
Thus the actual dpi being used by the display is 192*1280/2560 = 96, not the
192 sent to x2goagent and reported by xdpyinfo.
Your x2goagent is running using the correct (forced) 192 dpi as
specified via the command line. But your x2go window is much smaller
than your native desktop.

I am not really sure what to do here. Maybe we should try to calculate
the window size in mm, pass that to x2goagent and let it recalculate
the dpi itself.
Post by Davis, Jean-Paul
attempting to change the resolution from inside the session...
xrandr --size 1920x1200 works but keeps same actual dpi of 96 (so desktop is
larger than my screen)
I don't get that. How can the desktop become larger than the screen?
The window size of your x2go session is the size of the xserver the
MATE desktop sees. The dpi setting should - from my understanding -
influence the selected fonts and maybe scaling, but not the overall
size of the desktop.

Can you please provide some screen shots to minimize miunderstandings?

Also, can you please retry using the current developer version of
nx-libs as described here:
http://wiki.x2go.org/doku.php/doc:howto:nx-libs-betatesting

Uli
Davis, Jean-Paul
2017-04-16 18:38:35 UTC
Permalink
Also, can you please retry using the current developer version of nx-libs as
http://wiki.x2go.org/doku.php/doc:howto:nx-libs-betatesting
I finally got around to getting as far as I could trying to build a rpm for nx-libs 3.5.99.4 under RHEL 7 based on instructions at https://github.com/ArcticaProject/nx-libs/blob/3.6.x/README.md, but I get an error "File not found: /builddir/build/BUILDROOT/nx-libs-3.5.99.4-0.0build1.el7.centos.x86_64/usr/share/nx/fonts" no matter what I do. There is no such directory under RHEL 7.

I had the opportunity to try the Windows x2go client on a different computer to remote into my server. In that case, x2go correctly used the full resolution of the physical screen on the client computer, which I believe was something like 1920x1080. Anyone have further ideas?

Jean-Paul
Ulrich Sibiller
2017-04-18 07:53:01 UTC
Permalink
Post by Davis, Jean-Paul
Also, can you please retry using the current developer version of nx-libs as
http://wiki.x2go.org/doku.php/doc:howto:nx-libs-betatesting
I finally got around to getting as far as I could trying to build a rpm for nx-libs 3.5.99.4 under RHEL 7 based on instructions at https://github.com/ArcticaProject/nx-libs/blob/3.6.x/README.md, but I get an error "File not found: /builddir/build/BUILDROOT/nx-libs-3.5.99.4-0.0build1.el7.centos.x86_64/usr/share/nx/fonts" no matter what I do. There is no such directory under RHEL 7.
I had the opportunity to try the Windows x2go client on a different computer to remote into my server. In that case, x2go correctly used the full resolution of the physical screen on the client computer, which I believe was something like 1920x1080. Anyone have further ideas?
Jean-Paul
I have opened an issue for this on Arctica:
https://github.com/ArcticaProject/nx-libs/issues/432

Uli

Loading...