Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Duplicate
-
None
-
None
Description
I think it would be possible to dynamically update the resolution of a vnc connection to the actual browser window size by getting the inner resolution of the window using javascript like so:
window.innerWidth window.innerHeight
and then setting this resolution using xrandr.
I am unsure if it is already possible, but all you would need is a way to execute a command in the same shell as the vnc user is logged in (otherwise xrandr won't be able to access the display).
If this was possible, you could simply execute the following commands:
{{}}
cvt "$WIDTH" "$HEIGHT" "$REFRESH" | grep Modeline | sed "s/Modeline//" | xargs xrandr --newmode xrandr --addmode "$DEVICE" "$WIDTH"x"$HEIGHT"_"$REFRESH".00 xrandr --output "$DEVICE" --mode "$WIDTH"x"$HEIGHT"_"$REFRESH".00
{{}}
and this would change the resolution of the xsession to whatever the window size was.
Attachments
Issue Links
- duplicates
-
GUACAMOLE-1196 Add auto resize to VNC sessions
- Closed