im running into a problem on a CentOS 7.5 machine with the default vncserver (TigerVNC). Everything is working fine, except one visual flaw: the maximized size of the display is unequal to the actual size of the display (it is bigger). The result is that maximized windows are cropped on the right and bottom edges.
The specialty with this problem is, that it only occurs when not starting a window manager in xstartup. Which is what I want. To give you some background: the idea is to provide an application (fullscreen) via NoVNC in a webpage. Only the application should be accessible, so no window manager is needed. I've done that on CentOS 6 a few years ago and it worked really well.
I've played around with xrandr
and can set different resolutions without any problems. The windows of the VNC client also uses the new resolutions when reconnecting. But the applications keep thinking there is more space available.
To give you a numeric example of how the sizes are unequal: If I set the resolution to 1024x768, the window of the VNC client opens with a 1024x768 sized window. The resolution of the desktop though seems to be roughly 10% bigger. As if the maximized application thinks it should have an absolute size of ~1124x820.
Essentially the problem is comparable to the Zoom function of Mac OS where the content is scaled up and you can pan around by moving the mouse to the edges of the screen. Only that in my case the content is not scaled, and I also can't pan to see what is hidden behind the edge of the VNC client.
I have verified that this problem is independent of the client (same behaviour with the HTML-client and a native one).
The command I use in my systemd file seems good to me: /usr/bin/vncserver %i -desktop myapp -geometry 1024x768 -depth 24
.
My xstartup file:
#!/bin/sh
unset SESSION_MANAGER
[ -r /.Xresources ] && xrdb /.Xresources
/bin/xsetroot -solid grey -cursor_name arrow
/bin/vncconfig -nowin &
/bin/xrandr -s 1024x768
/usr/bin/xterm -maximized
I found a comparable question from 2002 here (Ars Technica Forum), but without a solution.
EDIT:
I did some further testing, and if I set -geometry 1124x846
all clients work properly. This seems the be the resolution that the application thinks is the full screen resolution. So the question would be where this resolution comes from and how I can change it. Raising the resolution via -geometry
does not make the application grow with it.