Uploaded image for project: 'Guacamole'
  1. Guacamole
  2. GUACAMOLE-1583

Dynamic Resolution Update for vnc connections

    XMLWordPrintableJSON

Details

    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

          Activity

            People

              Unassigned Unassigned
              fischer-felix Felix Fischer
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: