Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tigervnc client resizes remote sessions to current client screen size #327

Closed
durack1 opened this issue Jul 7, 2016 · 11 comments
Closed

Comments

@durack1
Copy link

durack1 commented Jul 7, 2016

I've hit a nasty bug with TigerVNC client (1.6.0) that causes a remote session to resize to the current local screen resolution, rather than what I would expect which is provide scrollbars (the behaviour I get with the RealVNC client). This resize is persistent across connection sessions, so that my original remote session (-geometry 2360x1320) becomes 1920x1151 and I am unable to resize back to the original display size, which then ensures that I have to kill and restart the active session.

Host OS: OS X 10.11.5
TigerVNC server: Xvnc TigerVNC 1.6.0 - built Dec 24 2015 16:05:46; Underlying X server release 11202000, The X.Org Foundation
TigerVNC client: 1.6.0
RealVNC client: 5.3.1

Here are some screen grabs of the behaviors, firstly RealVNC that provides scrollbars (and importantly doesn't resize the screen):
vnc-5p3p1
And the TigerVNC client that resizes the session upon connection:
tigervnc-1p6p0

@bphinz
Copy link
Contributor

bphinz commented Jul 7, 2016

Probably a silly question, but did you make sure that the "Resize remote session to the local window" option in the client is unchecked? Also, you can probably use the 'xrandr' command on the server to resize the session rather than restarting it.

@durack1
Copy link
Author

durack1 commented Jul 7, 2016

@bphinz thanks for the query.. I'm using TigerVNC Viewer 1.6.0 and was oblivious to the options available.. I had previously searched for a "Preferences" or similar option in the OS X menu bar - now that you've pointed that out I see that I did have the option "Resize remote session to local window" enabled - I'll untick this and try again.. And also try your xrandr suggestion.. Once I've confirmed this works, I'll close this up..

@durack1
Copy link
Author

durack1 commented Jul 7, 2016

@bphinz it seems that xrandr isn't going to solve the resize problem. I hadn't initialized vncserver with the -randr 1600x1200,1440x900,1024x768 or equivalent arguments and I get the following error when trying:

[duro@ocean bash_resources]$ xrandr -s 2360/1320
Size index 2360 is too large, there are only 14 sizes
[duro@ocean bash_resources]$ xrandr -s 2360x1320
Size 2360x1320 not found in available modes

I'll restart the session again and then re-test for the auto screen resizing

@bphinz
Copy link
Contributor

bphinz commented Jul 7, 2016

Are you limited to using RANDR 1.1 options for some reason? Can you try
'xrandr -fb 2360x1320'?

-brian

On Wed, Jul 6, 2016 at 11:14 PM Paul J. Durack notifications@github.com
wrote:

@bphinz https://github.com/bphinz it seems that xrandr isn't going to
solve the resize problem. I hadn't initialized with the -randr
1600x1200,1440x900,1024x768 or equivalent command and I get the following
error when trying:

[duro@ocean bash_resources]$ xrandr -s 2360/1320
Size index 2360 is too large, there are only 14 sizes

I'll restart the session again and then re-test for the auto screen
resizing


You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub
#327 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AHnWbQg7BpBTILkGz8ibAVKXtAirXvt2ks5qTG8DgaJpZM4JGql3
.

@durack1
Copy link
Author

durack1 commented Jul 7, 2016

@bphinz I tried xrandr --fb 2360x1320 and it seemed to resize the client (and session) window so that it became larger than the available screen (likely the 2360x1320), however when I try and then maximize that window so that it fills the complete laptop window (using the green window button in OS X) it again resizes the session back down to 1920x1151 rather than providing me with scrollbars as expected..

I'm half way through something so was trying to capture everything before restarting the session adding in the -randr 2360x1320 option to the vncserver command.. Curiously I just took a look at the Xvnc help, and -randr doesn't appear as one of the command arguments - is this correct?

@CendioOssman
Copy link
Member

Are you saying that disabling "Resize remote session to local window" did not help? The default behaviour is to resize the session, so that is perfectly normal and not a bug.

@CendioOssman
Copy link
Member

I'm half way through something so was trying to capture everything before restarting the session adding in the -randr 2360x1320 option to the vncserver command.. Curiously I just took a look at the Xvnc help, and -randr doesn't appear as one of the command arguments - is this correct?

Correct. -randr is not a valid argument to Xvnc or vncserver. There is no argument to control the default list of resolutions. New ones are added using xrandr --newmode.

@durack1
Copy link
Author

durack1 commented Jul 7, 2016

@CendioOssman apologies - I have not restarted the session and tested the behaviour once I unticked "Resize remote session to local window" - I'm currently on the commute and will do this once I'm in at the office and report back.. The experience above was for the existing vncserver session, not a freshly configured one..

Thanks for answering the -randr query, I was curious about this.. How do I use the xrandr --newmode? Is this used during session initialization, or for an existing session?

@CendioOssman
Copy link
Member

@CendioOssman apologies - I have not restarted the session and tested the behaviour once I unticked "Resize remote session to local window" - I'm currently on the commute and will do this once I'm in at the office and report back.. The experience above was for the existing vncserver session, not a freshly configured one..

The configuration is only on the client so you do not need to restart the session for it to take effect.

Thanks for answering the -randr query, I was curious about this.. How do I use the xrandr --newmode? Is this used during session initialization, or for an existing session?

It can be used whenever you like. I don't remember the exact arguments to it right now. Check its man page. Hopefully it has an example.

@durack1
Copy link
Author

durack1 commented Jul 7, 2016

@CendioOssman is there a way to kick GNOME or KDE session managers to also resize when xrandr is called? I have a TigerVNC client window that is now resized to 2360x1320 however the GNOME desktop is still only taking up 1920x1151..

@durack1
Copy link
Author

durack1 commented Jul 7, 2016

@bphinz @CendioOssman I have just confirmed that restarting a new session and toggling off "Resize remote session to local window" creates a local session with scrollbars so my issue is effectively closed. I also found the Xvnc option for -AcceptSetDesktopSize=0 and will start using this.

It would be great if the preferences available in the client "Options" window are also exposed through an OS X Menu bar "Preferences" option so that users like me who were oblivious to these hidden settings are guided by a fairly standard OS convention.. If you think this is a good idea, I'll create a new issue for the suggestion

@durack1 durack1 closed this as completed Jul 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants