Scale remote screen to window (X11) - #1672
Conversation
WIP: there is possible conflicts with server side resize X11 implementation only
|
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 |
|
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 |
|
@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. |
|
@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! |
|
To follow this PR :) |
|
Any tips on how I can contribute to make this feature available on macOS? |
I can make just wild guess, you need to know MacOS painting API. There is utilized low level painting API for each platform. |
|
Hi, I'm struggeling to find the command line option to enable the auto-scaling. |
|
0001-Scale-remote-screen-to-window-X11.patch updated patch on master |
|
Commit c24b36e seem to be wrong (outdated?), it doesn't apply anymore.
doesn't seem to be completely OK either - it applies to the latest commit well, but is causing a build error later on: After changing |
I also managed to successfully build the patch on master and it works great! ❤️ I had to install the following packages on sudo apt-get install libx11-dev libxext-dev libxdamage-dev libxfixes-dev libxrandr-dev libxtst-dev libjpeg-dev libpixman-1-dev libpam0g-dev libfltk1.3-dev libavcodec-dev libswscale-dev libwayland-dev libxkbcommon-dev libgnutls28-dev nettle-dev libsystemd-dev libpwquality-dev libpipewire-0.3-dev libglib2.0-dev uuid-dev gettext libpng-dev libxcursor-dev libxft-dev libfontconfig1-dev libexpat1-dev libfreetype6-dev libbz2-dev libxinerama-devIn target_link_libraries(vncviewer ${FLTK_LIBRARIES} ${Intl_LIBRARIES} brotlidec brotlicommon p11-kit idn2)With this, I managed to cmake it using: mkdir build && cd build
cmake -G "Unix Makefiles" -DBUILD_STATIC=0 -DCMAKE_INSTALL_PREFIX=/usr/local ..
make vncviewerAfter this, I could install vncviewer using I did not bother to fix issues building the other packages, but probably have to do with missing libraries. It would be great to see this being merged to master |
WIP: there is possible conflicts with server side resize
X11 implementation only