Skip to content

An open-source remote desktop application designed for self-hosting, as an alternative to TeamViewer.

Revert "fix(linux): bound the xrandr call in the wayland primary-display look…" (#15806)

RustDesk7c23fd307349
diff --git a/libs/scrap/src/wayland/display.rs b/libs/scrap/src/wayland/display.rs
index e3c5ebede..bed90fd76 100644
--- a/libs/scrap/src/wayland/display.rs
+++ b/libs/scrap/src/wayland/display.rs
@@ -76,9 +76,7 @@ fn run_with_timeout(
// 2. The distro may not have xrandr installed by default.
// 3. xrandr may not report "primary" in its output. eg. openSUSE Leap 15.6 KDE Plasma.
fn try_xrandr_primary() -> Option<String> {
- // Bounded like its two siblings below: this runs inside the held `DISPLAYS` guard, and from a
- // service with no DISPLAY and no session bus, where an X client can block indefinitely.
- let output = run_with_timeout("xrandr", &[], COMMAND_TIMEOUT, "xrandr")?;
+ let output = Command::new("xrandr").output().ok()?;
if !output.status.success() {
return None;
}