Bug 3055 - desktop environments resize session during startup (Randr)
Summary: desktop environments resize session during startup (Randr)
Status: NEW
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: VNC (show other bugs)
Version: trunk
Hardware: PC Unknown
: P2 Normal
Target Milestone: MediumPrio
Assignee: Peter Åstrand
Depends on: 5600
  Show dependency treegraph
Reported: 2009-03-27 10:01 CET by Peter Åstrand
Modified: 2023-08-30 07:24 CEST (History)
3 users (show)

See Also:
Acceptance Criteria:


Description Peter Åstrand cendio 2009-03-27 10:01:19 CET
According to Pierre, some DEs restores the screen resolution at login. This might be useful on a fat workstation, so that different users can have different resolutions, but this is most likely not what a ThinLinc user want. We could consider adding some mechanism to prevent this from happening, such as renaming/deleting the settings file.
Comment 1 Peter Åstrand cendio 2009-04-22 10:51:45 CEST
The settings file is called .config/monitors.xml. I experienced this problem on my SLED11 testing machine, after trying to use gnome-display-properties. See bug 3094. I think this bug is important to fix, moving to 3.0.1. 
Comment 2 Pierre Ossman cendio 2012-01-23 17:13:02 CET
Also see bug 4160.
Comment 3 Pierre Ossman cendio 2013-05-06 16:43:00 CEST
Gnome 3 seems to have added even more magic in this area. Without any configuration at all, Gnome 3 on Fedora 19 (alpha) will try to resize things to 1920x1200.

Not sure where it is getting this size from. It is the largest resolution in Xvnc's default list, so it might be that. It is probably trying to be clever and use the display's "native" resolution, and using the largest one when it cannot find an EDID.

There are some settings under "org.gnome.settings-daemon.plugins.xrandr" in dconf that might influence this.
Comment 4 Leon Pegg 2014-01-26 02:01:41 CET
Hi have a fix I use for this issue it is not the cleanest but it works with two files

g=$(echo `tl-session-param fbsize_x`x`tl-session-param fbsize_y`)
if [ -n "$g" ]; then
  m=$(cvt $(echo $g | tr x ' ') | grep ^Modeline | cut -f 2- -d ' ' | tr -d '"')
  s=$(xrandr | grep connected | cut -f 1 -d ' ')
  n=$(echo $m | cut -f 1 -d ' ')
  xrandr --newmode ${m[@]}
  xrandr --addmode $s $n
  xrandr -s $n > ~/.thinlinc/xrandr-fix.log

[Desktop Entry]
Name=Thinlinc Resolution Fix
Comment=Fix Screen Resolution Gnome3 Session
Comment 5 Pierre Ossman cendio 2014-03-28 14:02:40 CET
Unity also does this on login.
Comment 6 Pierre Ossman cendio 2014-11-03 15:49:26 CET
This seems to have to do with us not listing any preferred modes:

Comment 7 Pierre Ossman cendio 2015-07-30 15:20:14 CEST
There are two separate issues here. Moving the preferred mode portions to bug 5600. This bug is now about the general case and/or when the user has an explicit setting.
Comment 8 Pierre Ossman cendio 2018-04-16 13:42:20 CEST
Reported to GNOME to see if anything long term can be done:

Comment 9 Pierre Ossman cendio 2021-11-16 12:26:29 CET
If we go the route of delegating this completely to the client then we could possibly solve this by not adding any alternative modes to the outputs in Xvnc. This would mean that using xrandr (or similar) in the session would also stop working though.

Note You need to log in before you can comment on or make changes to this bug.