Repository navigation
Replies: 1 comment
|
I think rejecting invalid dimensions before calling XRandR would be the safest approach here. A width or height of 0 should probably be treated as an invalid resolution (or as "no change"), rather than being passed directly to XRandR. I'd also consider keeping the current resolution and restoring it if applying a new mode fails. That way, even if something goes wrong during the resolution change, the display doesn't end up disconnected and leave the session unusable. Might also be worth checking where the web client is generating the |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
RustDesk 1.5.1-0, Rocky Linux 9.8. The service runs as root (
--service→--server) on a TigerVNC X display:1(GNOME session, user uid 1000).A connection from the web client triggered a resolution change with
width=0, height=0. RustDesk applied it to XRandR, the output got disconnected, and capture has been broken since.Server log:
After this every capture attempt fails with
displays len: 0; one controller shows a black screen, another reports no display available.xrandrafter the change:Only a manual
xrandr --output VNC-0 --mode 1920x1080brings the output back (and capture works again).change_resolution()insrc/platform/mod.rsonly compares against the current mode and then callschange_resolution_directly()without validating the requested size.Expected: a request with width or height 0 should be rejected or treated as "no change", and if applying a mode fails or disconnects the only output, the previous mode should be restored.
All reactions