Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scale remote screen to window (X11) #1672

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

telychko
Copy link

WIP: there is possible conflicts with server side resize
X11 implementation only

WIP: there is possible conflicts with server side resize
X11 implementation only
@CendioOssman
Copy link
Member

Glad to see someone having a look at this. :)

FYI, one big technical hurdle is how to deal with partial updates and non-integer scaling. I.e. when the input is fractional pixels. The brute force approach is to re-render everything on each update, but that will be a big performance hit.

@samhed samhed added the enhancement New feature or request label Sep 12, 2023
@samhed samhed linked an issue Sep 12, 2023 that may be closed by this pull request
@telychko
Copy link
Author

Glad to see someone having a look at this. :)

FYI, one big technical hurdle is how to deal with partial updates and non-integer scaling. I.e. when the input is fractional pixels. The brute force approach is to re-render everything on each update, but that will be a big performance hit.

Thank you. My tests show no problem with partial updating and fractional scaling. All that handled by underlying drawing system. At least it working good under GNU Linux/X11

The real struggle for me could be do the same for Windows and Mac

@spinningD20
Copy link

spinningD20 commented Mar 12, 2024

I'm so glad I check every year for a good linux vnc client with auto scaling. I just happened to search this repo (my fav vnc client on all desktop platforms) today for scaling and found this PR.

I just wanted to say thanks to @telychko for this! I pulled this down and am using this successfully... FINALLY I have auto-scaling vnc client in linux without realvnc! I have always loved tigervnc as a client and was baffled when this functionality wasn't in the linux side.

Not sure what is specifically holding this PR up from being merged into master, but at least from a decently up-to-date arch install using X11, this is working perfectly.

Thanks again @telychko ! Now it's just tigervnc on my system.

edited for slip between tightvnc and tigervnc on my brain :D

@telychko
Copy link
Author

@spinningD20 Be careful when server side resize is ON. At the moment, server side resize and client scaling are mutually exclusive.

To merge this PR, there should be added options for choosing between server side resize and client side scaling. Also, macos and windows platform should be supported.

Unfortunately, I have no time for that. I'm working full time, and I did this PR on weekends. I was inspired as the tigervnc is my favorite VNC client.

@spinningD20
Copy link

@telychko yep I did run into that, so I just turned off resizing in the config. Just thankful to be able to use this feature, regardless of if certain scenarios are taken care of automagically or not.

context, I have two different "server" side machines, one virtual that resizes, one that is 1440p of main user session with x11vnc, that I access with a 4k client machine in another building on the same network.

I'm familiar with moonlight/sunshine and was using that for the 1440p to scale up, but I use i3wm on all three machines, and there is no easy way to enter and exit, and not break the system key listening for switching workspaces through moonlight.

However, with tigervnc, I can full screen and pass system keys through, then when I need to switch, un-full screen the session, switch workspace on client, full screen the next one, continue.

Since I am doing dev work on both of these machines, I don't actually need the capabilities of moonlight - I just need scaling and a convenient/reliable way to toggle the listening/passthrough of system keys.

Thanks again! Maybe if that is all that's holding this feature up from going in, I can try to contribute. No promises but would love to give back to one of the many open source projects I rely so heavily upon!

@Neustradamus
Copy link

To follow this PR :)

@rudironsonijr
Copy link
Contributor

Any tips on how I can contribute to make this feature available on macOS?
I can help, just need some guidance. (I can build everything, just need to know where to look at)

@telychko
Copy link
Author

Any tips on how I can contribute to make this feature available on macOS? I can help, just need some guidance. (I can build everything, just need to know where to look at)

I can make just wild guess, you need to know MacOS painting API. There is utilized low level painting API for each platform.

@jordyveys
Copy link

Hi, I'm struggeling to find the command line option to enable the auto-scaling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

scale remote screen to window
7 participants