How to move/drag the viewport on Android

348 views
Skip to first unread message

Paolo Amoroso

unread,
Apr 13, 2021, 9:43:19 AM4/13/21
to noVNC
Now Replit supports RFB-over-WebSocket and works really well with noVNC. Thanks for the great VNC client.

However, on Android the Move/Drag Viewport button doesn't seem to be doing what I expect.

I use noVNC to connect to Linux X Window sessions on Replit with a Lenovo Tab M8 HD 8" tablet running Android 10. Before connecting I mark the Clip to Window checkbox and set the scaling mode to Remote Resizing in the noVNC settings.

In a remote session, when I tap the Move/Drag Viewport button and try to drag the X desktop or an X window larger than the viewport, neither the X window, nor the viewport, nor the X desktop move. Long-tapping and dragging or two-finger tapping and dragging doesn't work either. I would instead expect to be able to adjust the X window and/or the viewport so that I can view different areas of the desktop.

What am I doing wrong? Are there any settings I need to change?

I use Chrome on the tablet and already cleared the storage for the noVNC page. The remote desktop size is larger than the browser viewport. I also tried other noVNC scaling modes but they don't make much difference.

Samuel Mannehed

unread,
Apr 14, 2021, 8:10:02 AM4/14/21
to Paolo Amoroso, no...@googlegroups.com
Hi Paulo,

> Now Replit supports RFB-over-WebSocket
> <https://docs.replit.com/repls/vnc> and works really well with noVNC
> <https://twitter.com/amoroso/status/1381959560676536322>. Thanks for
> the great VNC client.

We're glad to hear that it works well for you!

> However, on Android the Move/Drag Viewport button doesn't seem to be
> doing what I expect.
>
> I use noVNC to connect to Linux X Window sessions on Replit with a
> Lenovo Tab M8 HD 8" tablet running Android 10. Before connecting I
> mark the Clip to Window checkbox and set the scaling mode to Remote
> Resizing in the noVNC settings.

Remote resize and viewport drag kind of works against each other. The
viewport drag is intended to be used when the remote desktop is larger
than the browser viewport. The remote resize will resize the remote
desktop to fit the browser viewport (if your VNC server supports it).

How come you enable remote resizing?

> In a remote session, when I tap the Move/Drag Viewport button and try
> to drag the X desktop or an X window larger than the viewport,
> neither the X window, nor the viewport, nor the X desktop move.
> Long-tapping and dragging or two-finger tapping and dragging doesn't
> work either. I would instead expect to be able to adjust the X window
> and/or the viewport so that I can view different areas of the desktop.
>
> What am I doing wrong? Are there any settings I need to change?
>
> I use Chrome on the tablet and already cleared the storage for the
> noVNC page
> <https://groups.google.com/g/novnc/c/UeDK6g-alQo/m/kiBbZ2K0AgAJ>. The
> remote desktop size is larger than the browser viewport. I also tried
> other noVNC scaling modes but they don't make much difference.

It sounds like you're doing things correctly (aside from the remote
resize option). Are you completely sure the remote desktop is larger
than the browser viewport? How did you verify that?

You should be able to check the current resolution of the remote
desktop using 'xrandr'.

You could also set a new resolution with 'xrandr -s 1920x1080' for
example. Note that connecting, rotating the tablet or opening the on
screen keyboard will trigger the remote resize.

I tested viewport drag here in Chrome 89 on Android 11, it works
perfectly fine for me as long as I ensure the remote desktop is larger.

Best regards,
--
Samuel Mannehed Software Development
Cendio AB https://cendio.com
Teknikringen 8 https://twitter.com/ThinLinc
583 30 Linköping https://facebook.com/ThinLinc
Phone: +46 13 214 600

Paolo Amoroso

unread,
Apr 14, 2021, 9:32:40 AM4/14/21
to noVNC
Hi Samuel,

Thanks for the clarification.

Not using remote scaling when clip to window is set did the trick and now dragging the viewport works as expected on Android. I experimented with various scaling modes and the clip to window option. It turns out the remote desktop was smaller than I thought but I can make it larger if necessary.

As for your question on why I enabled remote scaling, I initially tested noVNC on my Chromebox. With remote scaling the remote desktop nicely fills the 1920x1080 screen of my Chromebox, so I assumed that was the best mode for Android too. What's the intended use case for remote scaling?

Thanks again,


Paolo

Samuel Mannehed

unread,
Apr 14, 2021, 11:12:25 AM4/14/21
to Paolo Amoroso, no...@googlegroups.com
Hi Paulo,

> Not using remote scaling when clip to window is set did the trick and
> now dragging the viewport works as expected on Android. I
> experimented with various scaling modes and the clip to window
> option. It turns out the remote desktop was smaller than I thought
> but I can make it larger if necessary.

I'm glad to hear you got things working!

> As for your question on why I enabled remote scaling, I initially
> tested noVNC on my Chromebox. With remote scaling the remote desktop
> nicely fills the 1920x1080 screen of my Chromebox, so I assumed that
> was the best mode for Android too. What's the intended use case for
> remote scaling?

Yeah, just like you noticed - remote resize is mostly useful on large
screens.

It would be nice if we could make use of viewport drag, scaling and
local touch gestures in the browser on these smaller screens. An area
for improvement..
Reply all
Reply to author
Forward
0 new messages