TurboVNC / turbovnc

Main TurboVNC repository
https://TurboVNC.org
GNU General Public License v2.0
747 stars 137 forks source link

How to display only main monitor and scale it to the client window? #320

Closed electricar closed 2 years ago

electricar commented 2 years ago

Hello,

I have Linux Mint as the remote PC. It has two monitors. Windows 10 is using TurboVNC to access the remote PC. I want to display only the main monitor and to scale it automatically to the client window.

Currently if I set Scaling Factor to Fixed Aspect Ratio, I can get the automatic scaling, but then both monitors are displayed, regardless of the Span Mode setting (Primary monitor only).

If I set the Scaling Factor to 100% then the main monitor is displayed a little bit too big and the second monitor can still be reached through scroll bars, regardless of the Span Mode setting (Primary monitor only).

What am I doing wrong?

Thank you very much in advance.

dcommander commented 2 years ago

To clarify, TurboVNC does not transmit the contents of the physical display on the remote machine. It creates its own virtual X server that is decoupled from the physical display. Are you using the TurboVNC Server? What is the desktop geometry of the TurboVNC Server session?

electricar commented 2 years ago

To clarify, TurboVNC does not transmit the contents of the physical display on the remote machine. It creates its own virtual X server that is decoupled from the physical display. Are you using the TurboVNC Server? What is the desktop geometry of the TurboVNC Server session?

I am not sure what server I am using on my Linux Mint PC. I think it is X11vnc. How can I check it? I have two WQHD monitors side by side. So it is not possible to have two separate monitors in TurboVNC or even to just display the pirmary monitor inlcuding automatic scaling?

dcommander commented 2 years ago

That is possible if you are using the TurboVNC Server or another server that supports the RFB ExtendedDesktopSize extension (TigerVNC, for instance), but again, the TurboVNC Server cannot transmit the contents of the physical display. I doubt that x11vnc supports the appropriate RFB extension, and there is nothing we can do about that.

electricar commented 2 years ago

Thanks for your reply. So you mean that with the TurboVNC or TigerVNC server, I could have automatic scaling but it would not be possible to have two separate displays or even only one displayed? Thus, the automatic scaling would work for both displays together?

dcommander commented 2 years ago

I think you are confusing scaling and automatic desktop resizing. They are two different things. Scaling means that the remote desktop is a fixed size, and the VNC viewer scales the remote desktop image either by a constant percentage or by the amount necessary to make it fit on the client display. Automatic desktop resizing means that the remote desktop size is adjusted based on the size of the client display. Automatic desktop resizing only makes sense if you are using Xvnc-- that is, if you are connecting to a virtual X server on the host rather than to the host's physical X server. If you are using the TurboVNC Viewer along with either the TurboVNC Server or the TigerVNC Server implementation of Xvnc, then the TurboVNC Viewer will automatically convey the client's screen geometry to the server. Thus, if you configure the viewer window to span all of the client's screens (which it will do by default in full-screen mode, but you can configure it to do so in windowed mode as well), then the remote desktop will automatically be configured with the same number of screens and the same screen geometry as the client. But it is unclear if that is what you mean by "two separate displays."