noVNC renders 2 displays into one canvas

161 views
Skip to first unread message

Fabian

unread,
Jul 9, 2024, 7:47:26 AM7/9/24
to noVNC
I am developing a Web-App which uses "react-vnc", a library which gives me the option to render noVNC in React.
When the destination device has only one display, everything works fine.
However when it uses 2 or more displays it renders all of them into one huge canvas.
With the scaleViewport option, the canvas will be scaled down to the webbrowser size.

So i want to ask, is it possible to tell noVNC to show only one display at a time?

Client and Server are running on Win11 machines.
I tried UltraVNC and TightVNC as VNC Server.
I am using a CLI WebSocket to TCP Socket called "wstcp"

regards

Pierre Ossman

unread,
Jul 9, 2024, 7:52:06 AM7/9/24
to no...@googlegroups.com, Fabian
On 7/9/24 13:47, Fabian wrote:
> I am developing a Web-App which uses "react-vnc", a library which gives me
> the option to render noVNC in React.
> When the destination device has only one display, everything works fine.
> However when it uses 2 or more displays it renders all of them into one
> huge canvas.
> With the scaleViewport option, the canvas will be scaled down to the
> webbrowser size.
>
> So i want to ask, is it possible to tell noVNC to show only one display at
> a time?
>

No, I'm afraid noVNC is designed to show the entire remote session. I'm
also unsure if those servers provide us with any information about the
monitor layout.

Have you checked if UltraVNC or TightVNC have any settings to only
export a single monitor?

Regards,
--
Pierre Ossman Software Development
Cendio AB https://cendio.com
Teknikringen 8 https://twitter.com/ThinLinc
583 30 Linköping https://facebook.com/ThinLinc
Phone: +46-13-214600

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?

Fabian

unread,
Jul 9, 2024, 7:59:59 AM7/9/24
to noVNC
I tried searching for such an option and UltraVNC has kind of that option but noVNC still shows both displays.
So i think this option only works for their own Client.

I also came up with the idea of "manually" scaling the drawn display.
If i have the resolution and position of the screens, could it be possible to tell noVNC to only draw in that area of the canvas?

I hope you understand my idea

regards

Pierre Ossman

unread,
Jul 11, 2024, 8:40:27 AM7/11/24
to no...@googlegroups.com, Fabian
On 09/07/2024 13:59, Fabian wrote:
> I tried searching for such an option and UltraVNC has kind of that option
> but noVNC still shows both displays.
> So i think this option only works for their own Client.
>
> I also came up with the idea of "manually" scaling the drawn display.
> If i have the resolution and position of the screens, could it be possible
> to tell noVNC to only draw in that area of the canvas?
>
> I hope you understand my idea
>

No, I'm afraid there are no such settings. Perhaps you could do
something creative with CSS? I.e. format the web page in such a way that
only part of the canvas is actually visible.

Regards,
--
Pierre Ossman Software Development
Cendio AB http://cendio.com
Teknikringen 8 http://twitter.com/ThinLinc
583 30 Linköping http://facebook.com/ThinLinc

gregory palaci

unread,
Sep 4, 2024, 6:49:47 AM9/4/24
to noVNC
I'm wondering is it possible to to parse the canvas pixel data and map the displays....
So the gray/black areas we know is not a display, then plot x,y width and height and save an array of remote displays to be able to toggle?
Reply all
Reply to author
Forward
0 new messages