Closed Kreyren closed 4 years ago
Hi @Kreyren, excellent point. I've been meaning to do something here for a while now, because I think it's quite unfortunately that the noVNC virtual desktop doesn't automatically resize with the preview pane.
One flagrant example is https://github.com/techwithtim/Hangman/, a really cool Python demo that can be started automatically in Gitpod, however the Hangman game window opens in the center of the virtual desktop, so it's not visible by default in the preview pane (unless you know that you should expand it or maximize it).
See also #303, in which we identified a promising noVNC option called resize
: https://github.com/gitpod-io/gitpod/issues/303#issuecomment-463275662
However, it didn't work in our experiments, and we're not sure why. It would be great to resume these experiments, and see if this can be troubleshooted & fixed, because the current fixed-size virtual desktop in which you have to scroll around is just bad UX. (What's worse, scrolling in the virtual desktop also switches between 4 virtual desktops... which is super confusing and useless).
More related to your question though, I think that once we have a virtual desktop with an auto-adaptive size, any GUI apps that's maximized should also follow the preview dimensions... hopefully.
noVNC apparently supports autoscale (https://github.com/novnc/noVNC/issues/763)
Using vnc.html?resize=<scale | downscale | remote>
does not seem to have an effect on this issue
Appending &autoconnect=1
to vnc.html does not seem to have an effect on this issue.
Research required.
ping @jankeromnes Running https://6080-....gitpod.io/vnc.html with following configuration fixes the issue. Is that usable for gitpod implementation?
Amazing, thank you so much @Kreyren for researching this! 🎉 🙏 💯
I don't have time to test it now, but if this works well we should probably make that the default behavior in Gitpod, e.g. via a noVNC launch.sh
option in:
(assuming the desired configuration can be passed via CLI options there -- if not we'll have to find another way)
I can take a look at this tomorrow. Huge thanks again for driving this toward a fix, I've been waiting for an auto-resizing noVNC for so long now... 😲
@Kreyren Awesome 💯
I'll look into preparing a PR
Thanks a ton for the fix @JesterOrNot! 🙏 🎉
I just merged your PR, so this should land in production as soon as the workspace-images master
build is through (E.T.A ~30min I think).
Current
Expected
I need some solution to make diagrams willing to change the software if there is something better.