11760 Commits
Author SHA1 Message Date
RustDeskandClaude Opus 5.5 0f65927e91 fix(mobile): move the key bar out of the canvas gesture region (#17379)
* fix(mobile): keep gestures on the key bar from clicking the remote

The key bar sits inside the remote canvas's gesture region, so any tap,
double tap or long press its buttons do not take went to the canvas
recognizers: a tap between keys clicked the remote, two quick taps on a
key double-clicked it, and a long press right-clicked it, with any
latched modifier added. Wrap the bar in an opaque GestureDetector that
claims those gestures; its recognizers join the arena before the
canvas's, so they win.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkig1bcC5Xrr1uwX47b

* fix(mobile): move the key bar out of the canvas gesture region

The GestureDetector wrapper won the arena but the canvas recognizers still
saw every touch on the bar: onLongPressDown sends a left-button down to a
mobile peer before the arena decides, so a long press on the bar lost its
button-up, and the canvas double-tap recognizer kept delaying and dropping
quick key taps.

Drop the wrapper and stack the bar above the canvas instead of inside it,
so a touch on the bar never reaches the canvas recognizers. The remote
cursor and the virtual mouse move up with it and stay above the bar, as
they were inside the canvas stack.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkig1bcC5Xrr1uwX47b

* fix(mobile): keep the mouse-mode virtual mouse inside the canvas gesture region

Holding a virtual left/right button while another finger drags relies on
the canvas recognizer seeing both pointers: it then takes the
isSpecialHoldDragActive branch of onTwoFingerScaleUpdate. With the virtual
mouse moved above the key bar and out of the region, the recognizer saw
only the dragging finger, routed it through onOneFingerPanUpdate, and any
movement of the holding finger set blockEvents and froze the drag while the
remote button stayed down. Put FloatingMouseWidgets back where master has
it; the cursor and the touch-mode virtual mouse stay above the bar.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkig1bcC5Xrr1uwX47b

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-04 20:11:07 +08:00
RustDeskandClaude Opus 5.5 ecf60f961e fix(windows): ship app icons with a frame for every shell size (#17412)
The Flutter runner's app_icon.ico had a single 48 px frame, so Explorer,
shortcuts and the taskbar scaled it up at larger icon views and display
scales. Regenerate it from res/icon.png, which the old frame was made
from, with 16, 20, 24, 32, 40, 48, 64, 96, 128 and 256 px frames.

res/icon.ico (the downloadable portable exe, the MSI and the Sciter
build) stopped at 128 px. Add a 256 px frame and keep its other frames
byte for byte.


Claude-Session: https://claude.ai/code/session_01JAxkkig1bcC5Xrr1uwX47b

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-04 17:30:46 +08:00
RustDeskandClaude Opus 5.5 ae717917e2 fix(appimage): verify bundled apt packages and keep the CWD off search paths (#17404)
* fix(appimage): verify bundled apt packages and keep the CWD off XDG dirs

The AppImage recipes fetched the Ubuntu packages they bundle (libc6, GTK,
GStreamer, ...) over HTTP with allow_unauthenticated, and the aarch64 key
came from the keyserver over HTTP. Use the HTTPS archive, drop
allow_unauthenticated, and trust Ubuntu's 2012 and 2018 archive signing
keys, both of which sign focal, from a key file in the repository.

XDG_DATA_DIRS and XDG_CONFIG_DIRS end with the host value, which AppRun
expands to nothing when the host leaves it unset; the empty element makes
GLib search the current directory, so launching the AppImage from a
directory someone else can write let it supply gtk-3.0/settings.ini and
similar files. Put a "/" before the host value: unset it leaves the root,
set its first absolute path becomes the same "//path".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkig1bcC5Xrr1uwX47b

* fix(appimage): keep the CWD off LD_LIBRARY_PATH when the host has none

AppRun sets LD_LIBRARY_PATH to "$APPDIR_LIBRARY_PATH:" followed by the
host's value, so a host without LD_LIBRARY_PATH (the usual case) gets an
empty last element, which the dynamic loader searches as the current
directory. RustDesk looked up libpulsecommon and libGLX there, and the
loginctl it runs looked up libsystemd-shared there on every call, so a
library planted in the directory the AppImage is started from would be
loaded. Patch AppRun to drop empty elements after building the value.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkig1bcC5Xrr1uwX47b

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-04 12:00:47 +08:00
Xzar 26f17dff05 fix(mobile): keep file manager bottom sheet above system navigation bar (#17393) 2026-12-04 11:36:13 +08:00
RustDeskandClaude Opus 5.5 b67c5279f9 fix(linux): wake the tray event loop at its WaitUntil deadline (#17403)
Bump rustdesk-org/tao to 74684bd8, a cherry-pick of tauri-apps/tao#1458.
On Linux, tao's run_return blocked in gtk::main_iteration_do(true) for
ControlFlow::WaitUntil with no GLib source for the deadline, so an idle
loop slept until some unrelated event arrived. The tray polls menu events
under a 100 ms WaitUntil, so a menu click could wait many seconds (#17124).
The patch only touches src/platform_impl/linux/event_loop.rs.


Claude-Session: https://claude.ai/code/session_01JAxkkig1bcC5Xrr1uwX47b

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-04 11:22:19 +08:00
HelixNebula f50d282872 ci: install hash-pinned dependencies in the signing steps (#17390)
The two 'Sign rustdesk files' steps ran 'pip3 install requests argparse'
unpinned, in the same step that passes SIGN_SECRET_KEY to res/job.py.
argparse is part of the standard library; the PyPI package is an old,
unneeded backport. Install requests and its dependencies from a
hash-locked requirements file instead, as res/update already does for
the update-metadata signing step. The versions support Python 3.9+.
2026-12-04 11:00:23 +08:00
HelixNebula 711d026151 ci: do not persist checkout credentials (#17391)
actions/checkout stores the job's GITHUB_TOKEN in .git/config unless
persist-credentials is false. No job except update-webpki-roots (which
pushes a branch and is left unchanged) uses git with that token after
checkout, so set persist-credentials: false on the other checkouts. This
keeps the token out of the workspace that build scripts, vcpkg ports,
cargo build scripts and run-on-arch containers can read.
2026-12-04 10:57:30 +08:00
RustDeskandClaude Opus 5.5 40e3672a9d fix(macos): stop ScreenCaptureKit audio capture when the stream is dropped (#17378)
Bump cpal to rustdesk-org/cpal@3361bd6 (rustdesk-org/cpal#8). The
ScreenCaptureKit backend released its native stream on drop without
calling stopCapture; it now stops a playing stream asynchronously and
keeps the native objects alive until the stop completes.


Claude-Session: https://claude.ai/code/session_01JAxkkig1bcC5Xrr1uwX47b

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 23:09:37 +08:00
RustDeskandClaude Opus 5.5 9cbafa5f0e fix: keep the Telegram bot token out of logs and off TLS fallback (#17375)
* fix: redact Telegram tokens and zeroize session passwords

* fix: keep the Telegram bot token out of logs and off TLS fallback

The Telegram bot API carries the bot token in the URL path. Telegram
requests went through post_request, which logs the failed reqwest error,
URL included, at warn level before retrying and then returns it, and the
2FA path logs it again. Whenever api.telegram.org was unreachable, each
2FA login wrote the token to the log file. On a TLS error post_request
also retried with invalid certificates accepted, so whoever presented a
certificate on the path received the token and the 2FA code.

Send Telegram requests once with verified rustls, without fallback, and
drop the URL from their errors. Other post_request callers are unchanged.

Revert the Zeroizing session password: the plaintext password is also
held by the Dart UI, the login dialog path and argv, so wiping the
preset copy changed nothing observable.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkig1bcC5Xrr1uwX47b

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 20:53:17 +08:00
fufesou 8522f17a7a Update rustls to 0.23.46 (#17371)
Signed-off-by: fufesou <linlong1266@gmail.com>
2026-12-03 15:57:46 +08:00
fufesou f705ebeb8d Fix/privacy mode display crash recovery (#17333)
* fix(windows): recover privacy mode displays after a forced exit

Signed-off-by: fufesou <linlong1266@gmail.com>

* fix(windows): retain pending privacy display recovery across restarts

Signed-off-by: fufesou <linlong1266@gmail.com>

* fix(windows): preserve pending privacy recovery during cleanup and activation

Signed-off-by: fufesou <linlong1266@gmail.com>

* fix(windows): clear obsolete privacy display recovery records

Recheck active Amyuni displays during the existing monitor timeout before retiring a missing target. Keep the record for ambiguous selections and unplug errors so a stale record does not block the next privacy session after the monitor is gone.

Read the saved Windows display name through its first terminator. Cover stale and temporary absences separately from a failed driver request.

Signed-off-by: fufesou <linlong1266@gmail.com>

* fix(windows): retire missing privacy displays with other monitors active

Check for the saved Amyuni display before treating multiple active displays as ambiguous. Two unrelated displays can then remain connected while an obsolete recovery record expires. Cover that case in the existing recovery selection test.

Signed-off-by: fufesou <linlong1266@gmail.com>

* fix(windows): recheck pending display recovery before activation

A Mode 2 request can skip monitor preparation when the owner or selected implementation changes. Check the saved recovery record under the activation lock before enumerating displays so the new session cannot replace the pending record.

Exercise activation without preparation in the isolated Windows recovery test.

Signed-off-by: fufesou <linlong1266@gmail.com>

* fix(windows): attempt privacy display recovery once at startup

Select a sole matching Amyuni display from the first scan and verify removal after the driver request. Consume the record after checking the registry even on unplug failure, so preparation, activation and idle shutdown can use their normal paths.

Signed-off-by: fufesou <linlong1266@gmail.com>

* fix(windows): limit privacy display recovery to server startup

Read the saved Amyuni display only in the startup unplug branch. Keep the existing registry parser and unconditional record reset, including when display recovery fails. Cover the display-only record and legacy parsing without a callback or child process.

Signed-off-by: fufesou <linlong1266@gmail.com>

---------

Signed-off-by: fufesou <linlong1266@gmail.com>
2026-12-03 13:27:42 +08:00
RustDeskandClaude Opus 5.5 805b5a5a23 fix(flutter): leave no orphan "waiting for image" dialog on reconnect (#17357)
OverlayDialogManager.show() keeps one dialog per tag. Showing a second
dialog under a tag that is already open replaces the map entry but
leaves the first overlay inserted, so neither dismissByTag() nor
dismissAll() can remove it.

The waiting-for-image dialog can be shown twice before the first frame.
On a reconnect to a Windows host with several Windows sessions, the
client already has the session selected, so handle_peer_info() reports
the wait and the automatic send_selected_session_id() reports it again.
The first overlay then stays on top of the remote view after video
starts, and after Cancel it stays over the peer list, blocking taps.

Dismiss any waiting dialog of the session before showing a new one.

Fixes #17233


Claude-Session: https://claude.ai/code/session_01JAxkkig1bcC5Xrr1uwX47b

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 22:30:53 +08:00
aseeb shibin 21c7bb71ce fix(clipboard): avoid triggering lazy macOS file URL providers (#17328)
Signed-off-by: aseeb shibin <aseebshibin4@gmail.com>
2026-12-02 22:22:04 +08:00
RustDeskandClaude Opus 5.5 8dd5ab4378 fix(appimage): look up host libraries in /usr/lib on aarch64 (#17358)
* fix(appimage): look up host libraries in /usr/lib on aarch64

The AppImage puts host library and GStreamer plugin paths before its own
so that Wayland capture uses the host's GStreamer and PipeWire. Those
paths were /lib64 and the Debian multiarch dir only. Arch Linux ARM has
neither on aarch64 (its filesystem package adds lib64 only on x86_64),
so the AppImage ran on its bundled focal stack: GStreamer 1.16 with
libpipewire 0.2, which crashes against PipeWire 1.x when the capture
pipeline is created. x86_64 Arch is not affected because /lib64 points
to /usr/lib there.

Add /usr/lib after the multiarch dir in APPDIR_LIBRARY_PATH, and the
matching /usr/lib/gstreamer-1.0 and /usr/lib/gio/modules entries.

Fixes #17301

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkig1bcC5Xrr1uwX47b

* fix(appimage): drop the no-op GIO_MODULE_DIR entry

GLib reads GIO_MODULE_DIR as a single directory, not a search path, so
a /usr/lib/gio/modules entry in it changes nothing. Keep the change to
the library and GStreamer plugin paths, and put the comment above the
library path it explains.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkig1bcC5Xrr1uwX47b

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 22:11:54 +08:00
8c6f1e2a1a fix(linux): keep the window background transparent with Flutter >= 3.27 (#17347)
* fix(linux): keep the window background transparent with Flutter >= 3.27

Since Flutter 3.27, FlView fills itself with an opaque black background
unless fl_view_set_background_color() is called (flutter/engine#54575, the
fix for flutter/flutter#152154). Newer versions also draw without a
GtkGLArea, so find_gl_area() returns nothing and the window border and
rounded corners are drawn black (e.g. with Flutter 3.44, which
apply_flutter_3.44_source_patches.sh supports and distributions use).

Make the view transparent with fl_view_set_background_color(), the API
Flutter provides for this. Flutter >= 3.27 also sets up its GtkGLArea for
transparency itself, so this replaces the GtkGLArea workaround there. The
function is declared weak so that Flutter 3.24, which does not have it,
still builds and keeps using the workaround.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Yichao Yu <yyc1992@gmail.com>

* chore(flutter): bump desktop_multi_window for transparent Linux sub-windows

Pulls in rustdesk-org/rustdesk_desktop_multi_window#41, the sub-window
counterpart of this fix: with Flutter >= 3.27 the sub-window FlView needs
fl_view_set_background_color() to stay transparent, otherwise
remote-session windows get black borders and corners. It is a weak symbol,
so the Flutter 3.24.5 builds are unchanged.

The Flutter 3.44 and 3.22 bridge lock diffs do not touch this entry and
still apply unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkig1bcC5Xrr1uwX47b

---------

Signed-off-by: Yichao Yu <yyc1992@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: RustDesk <71636191+rustdesk@users.noreply.github.com>
2026-12-02 18:21:42 +08:00
rustdeskandClaude Opus 5.5 8daa0ed0ee Revert "chore(flutter): bump desktop_multi_window for transparent Linux sub-windows"
This reverts commit 4174b4cc6f, pushed to
master by mistake. The bump lands with #17347 instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkig1bcC5Xrr1uwX47b
2026-12-02 18:19:22 +08:00
rustdeskandClaude Opus 5.5 4174b4cc6f chore(flutter): bump desktop_multi_window for transparent Linux sub-windows
Pulls in rustdesk-org/rustdesk_desktop_multi_window#41: with Flutter >= 3.27
the sub-window FlView needs fl_view_set_background_color() to stay
transparent, otherwise remote-session windows get black borders and corners
(e.g. the Flutter 3.44 riscv64 build). It is a weak symbol, so the Flutter
3.24.5 builds are unchanged. The main window counterpart is #17347.

The Flutter 3.44 and 3.22 bridge lock diffs do not touch this entry and
still apply unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkig1bcC5Xrr1uwX47b
2026-12-02 18:02:08 +08:00
StealUrKill fbebada5bf Feature: Address book & accessible devices side panels resizable (#17153)
* Feature: Make the address book & accessible devices side panels resizable

The Address book panel and the Accessible devices panel can now
be resized by dragging a divider on their right edge. The width is clamped
(150–300px) and persisted per panel as a local option, so it survives restarts.

* Fix side panel overflow in narrow windows

A saved panel width can push the divider and the peer list off the
screen. The panel now uses the row width to limit its visible width.
When there is space, the peer list shows one full peer card.
2026-12-02 15:35:14 +08:00
621cace696 ci: add linux riscv64 build (#16374)
* ci: add linux riscv64 build

Cross-builds the Flutter deb for riscv64 on x86_64 against Ubuntu
24.04's riscv64 ports, with Flutter 3.44.9 (the release the arm64
builds and the 3.44 bridge use, with the shared 3.44 source patches
and lock diff) and rustdesk-org/flutter-engine's riscv64 engine.

Like the other Linux debs since #17089 it carries the drm backend and
libdrmtap, cross-built here and handed to build.py through
DRMTAP_PREBUILT_DIR. libvpx and libaom are built from the res/vcpkg
overlay ports' sources and linked statically, as vcpkg links them on
x86_64 and aarch64, so the deb does not depend on a distribution's
codec sonames. The job runs only when uploading (nightly, tags), as
build-rustdesk-linux builds aarch64.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* build.py: require Ubuntu 24.04's glibc and libstdc++ in the riscv64 deb

The riscv64 deb is cross-built on Ubuntu 24.04: librustdesk.so needs
GLIBC_2.38 and the Flutter runner needs GLIBCXX_3.4.32. Every package in
its Depends also exists on Ubuntu 22.04, so apt installed it there and
the service then failed to start. Declare the build base's libc6 and
gcc 13's libstdc++6 so apt refuses the install instead.

Checked with apt-get install -s on a package with this Depends: Ubuntu
22.04 refuses it (libc6 2.35, libstdc++6 12); Ubuntu 24.04, Ubuntu
26.04 and Debian 13 install it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkig1bcC5Xrr1uwX47b

---------

Co-authored-by: Dani Sarfati <danifunkervogt@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: RustDesk <71636191+rustdesk@users.noreply.github.com>
2026-12-01 23:51:17 +08:00
Felipe Pérez Galiana a6b2dd9912 fix(i18n): correct typos and Spanish translations (#17344) 2026-12-01 23:19:43 +08:00
rustdeskandClaude Opus 5.5 e78e6ab0ee ci: generate the Flutter 3.44 bridge with 3.44.9
The builds that use bridge-artifact-flutter-3.44 (Windows and macOS
arm64) are on Flutter 3.44.9, while the bridge was still generated with
3.44.8. Generate it with the same release. Both releases pin the same
SDK packages, so flutter_3.44_pubspec.lock.diff still applies.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkig1bcC5Xrr1uwX47b
2026-11-30 18:40:52 +08:00
21pages 8337837469 feat: add custom client options to hide session toolbar actions and menus (#17318)
* feat(toolbar): hide OS password and skip saved password auto-login

Signed-off-by: 21pages <sunboeasy@gmail.com>

* feat(toolbar): allow hiding Send clipboard keystrokes

Signed-off-by: 21pages <sunboeasy@gmail.com>

* feat(toolbar): allow hiding View camera

Signed-off-by: 21pages <sunboeasy@gmail.com>

* feat(toolbar): allow hiding Terminal (beta)

Signed-off-by: 21pages <sunboeasy@gmail.com>

* feat(toolbar): allow hiding TCP tunneling

Signed-off-by: 21pages <sunboeasy@gmail.com>

* feat(toolbar): allow hiding Switch Sides

Signed-off-by: 21pages <sunboeasy@gmail.com>

* feat(toolbar): allow hiding Take screenshot

Signed-off-by: 21pages <sunboeasy@gmail.com>

* feat(toolbar): allow hiding Voice call while keeping text chat

Signed-off-by: 21pages <sunboeasy@gmail.com>

* feat(toolbar): allow hiding the Display Settings menu

Signed-off-by: 21pages <sunboeasy@gmail.com>

* feat(toolbar): allow hiding the Keyboard Settings menu

Signed-off-by: 21pages <sunboeasy@gmail.com>

---------

Signed-off-by: 21pages <sunboeasy@gmail.com>
2026-11-30 18:35:13 +08:00
68bf4ebe58 fix(windows): forward Unicode Auto-Type input (#16481)
* fix(windows): forward Unicode Auto-Type input

Decode VK_PACKET text before physical-key mapping, preserve surrogate pairs, and route it to the focused session through the existing text-input message.

Track Windows focus for Input Source 2 and document its mixed-event ordering limitation.

Signed-off-by: fufesou <linlong1266@gmail.com>

* fix(unix): forward KeePassXC Auto-Type text

Decode native macOS and Linux text events before physical-key processing, preserve UTF-16 surrogate pairs across key releases, and route text to the focused writable session.

Select the existing Input Source 1 path from the actual GTK display backend so XWayland works on Wayland desktops. Native Wayland remains on Input Source 2.

Signed-off-by: fufesou <linlong1266@gmail.com>

* refact: simple refactor

Signed-off-by: fufesou <linlong1266@gmail.com>

* test(windows): cover Unicode packet text decoding

Verify BMP characters and consecutive surrogate pairs produce the expected text through the Windows packet decoder.

Signed-off-by: fufesou <linlong1266@gmail.com>

* feat(windows): make Unicode input opt-in from general settings

Keep legacy input as the default and apply the saved Windows option at startup and when changed. Add the setting under General > Other and remove the branch's Linux and macOS Unicode input handling.

Signed-off-by: fufesou <linlong1266@gmail.com>

* refactor(windows): simplify Unicode packet forwarding

Preserve input-source gating and callback results while reducing the branch diff.

Signed-off-by: fufesou <linlong1266@gmail.com>

* fix(keyboard): unicode input, translations

Signed-off-by: fufesou <linlong1266@gmail.com>

* Route Windows Unicode packets to the current session

Check permissions on the same session that receives packet text and physical keys. Preserve valid text after an unpaired high surrogate and run the decoder tests on all platforms.

Signed-off-by: fufesou <linlong1266@gmail.com>

* Pin rdev to the merged Unicode packet change

The lockfile bump to rustdesk-org/rdev#27 was made while resolving a
merge commit, which the rebase onto master dropped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkkfvhEPKVg85ZHovfs

---------

Signed-off-by: fufesou <linlong1266@gmail.com>
Co-authored-by: RustDesk <71636191+rustdesk@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 18:12:41 +08:00
fufesou 38e00b622f Fix/unix ipc auth (#17235)
* fix: verify Unix IPC endpoint and configuration sync peers

Check kernel peer credentials before dispatching main IPC messages. Verify the root service, the active user's main endpoint for management commands, and the process submitting service synchronization.

Signed-off-by: fufesou <linlong1266@gmail.com>

* fix: stop stale Linux GUIs and confirm Unix codec reports

Close the installed GUI before a package upgrade replaces its executable. Keep the codec probe alive until the installed Unix host reads back its report on the same IPC connection.

Signed-off-by: fufesou <linlong1266@gmail.com>

* fix: keep existing Linux package upgrade behavior

An Ubuntu upgrade from 1.5.0 to 1.5.3 on master already closed the main window. Drop the extra GUI termination from the Debian, RPM and Arch upgrade scripts to keep package lifecycle changes out of the IPC fix.

Signed-off-by: fufesou <linlong1266@gmail.com>

* fix: wait for Unix IPC peer verification before takeover

Keep an installed non-root server alive for a status round trip on the same main IPC connection before requesting the previous listener to close. This gives the listener time to verify the executable of the process requesting takeover.

Signed-off-by: fufesou <linlong1266@gmail.com>

* test: cover Unix service sync sender identity

Signed-off-by: fufesou <linlong1266@gmail.com>

* refact: function rename

Signed-off-by: fufesou <linlong1266@gmail.com>

* Refact: Remove unrachable branch

Signed-off-by: fufesou <linlong1266@gmail.com>

* fix: wait for macOS main IPC verification before one-way sends

Keep the socket open until the listener replies to OnlineStatus. This lets the installed host resolve the sender PID before the GUI sends a password refresh or another one-way request.

Signed-off-by: fufesou <linlong1266@gmail.com>

---------

Signed-off-by: fufesou <linlong1266@gmail.com>
2026-11-30 17:42:35 +08:00
6cdf4412c9 fix(wayland): send portal wheel scrolls as discrete steps (#17295)
On a Wayland host that injects input through the RemoteDesktop portal,
wheel steps went to NotifyPointerAxis, which carries smooth-scroll
pixels, so a wheel click scrolled about one pixel: on mutter (46 and 51
tested), libei-based portals (KDE master, COSMIC) and the wlr
RemoteDesktop implementation. Released KDE portals (Plasma 6.8 and
older) pass the value to KWin fake input with y negated, so vertical
scrolling there also went backwards.

Send the steps with NotifyPointerAxisDiscrete. On GNOME a click now
arrives as a wheel step (value120 = 120). The KDE portals that still use
KWin fake input turn each step into one axis unit without a wheel step,
so multiply the steps by 10 when KWin is older than 6.8.80; in Qt, GTK3,
Firefox and Chromium that scrolls as far as a local wheel click. The
KWin version is read once from org.kde.KWin.supportInformation; if that
fails, the steps are not scaled.

Fixes #17264



Claude-Session: https://claude.ai/code/session_01JAxkkkfvhEPKVg85ZHovfs

Co-authored-by: x7edo1x-glitch <285020844+x7edo1x-glitch@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 17:08:07 +08:00
RustDeskandClaude Opus 5.5 b250103ff5 fix(wayland): no "select the screen" hint when the restore token skips the picker (#17319)
With a restore token saved, the portal answers without showing its
picker, yet every first-viewer login still told the peer "Please Select
the screen to be shared(Operate on the peer side)". CAP_DISPLAY_INFO is
cleared when the last viewer leaves, so is_inited() reports "not
inited" on each new connection.

When the server process has a token saved, the login now holds the
message back for 3 s and drops it if the display refresh (portal request
and capturer setup) finishes first. If the portal turns the token down
and shows its picker, the message goes out after 3 s. Without a token
the message is sent at once, as before.

Fixes #17317


Claude-Session: https://claude.ai/code/session_01JAxkkig1bcC5Xrr1uwX47b

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 15:31:34 +08:00
6380d8c7a3 fix(linux): reap xrandr child process in change_resolution_directly (#17213)
* fix(linux): wait for xrandr in change_resolution_directly to prevent zombie processes

* test(linux): add xrandr end-to-end and zombie-reaping tests

* fix(linux): run change_resolution via spawn_blocking and simplify xrandr test

* fix(linux): reap xrandr on a separate thread

Wait for xrandr on a dedicated thread in change_resolution_directly, and log a failed exit with throttled_log. Callers no longer wait for xrandr, so the async worker and restore_resolutions do not block.

Restore src/server/connection.rs to its state on master. The Windows and macOS paths do not change.

Replace the regression test with one that needs no X server.

* fix(linux): create xrandr reaper thread fallibly before spawning xrandr

* fix(linux): reap xrandr through the existing CHILD_PROCESS list

Push the xrandr child to CHILD_PROCESS, which check_zombie() already polls in the server process. This removes the waiter thread, the channel, and the second wait path that earlier commits added.

* test(linux): drop the xrandr reaping test

The test skips itself when xrandr is missing, and the CI Linux job does
not install it, so it gives no reliable coverage there. The real-session
results are the evidence for this fix.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkig1bcC5Xrr1uwX47b

---------

Co-authored-by: RustDesk <71636191+rustdesk@users.noreply.github.com>
Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-30 12:01:58 +08:00
459b4141ee Add keyboard mode to Display settings (#17236)
* feat: support a configurable default keyboard mode

* fix(web): preserve the selected keyboard mode for input source 2

* Point hbb_common back to upstream after PR #646

* ci: run web keyboard mode tests in Chrome

* test: remove browser-only keyboard mode tests and CI step

* Hide the keyboard mode setting on controllers with a single input source

* Keep the keyboard mode setting when only Input source 1 is available

* Update libs/hbb_common to latest main

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: RustDesk <71636191+rustdesk@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-11-29 22:41:37 +08:00
fufesou 64fb67d4f3 Fix/preserve ipc reg recovery (#17278)
* fix(ipc): preserve the host privacy recovery record during settings updates

Signed-off-by: fufesou <linlong1266@gmail.com>

* fix(ipc): keep Windows config mirrors from overwriting host recovery

Signed-off-by: fufesou <linlong1266@gmail.com>

* fix(ipc): keep display recovery in the Windows host profile

Signed-off-by: fufesou <linlong1266@gmail.com>

* fix(ipc): preserve Windows recovery across sync and offline edits

Keep the original options for a round trip to an older host and filter the separate profile during persistence. Read and write single-option edits over the same authenticated connection. Use locked profile updates when the host pipe is absent.

Signed-off-by: fufesou <linlong1266@gmail.com>

* fix(ipc): keep Windows offline option edits and GUI acknowledgements consistent

Signed-off-by: fufesou <linlong1266@gmail.com>

* fix(ipc): limit recovery protection to configuration updates

Signed-off-by: fufesou <linlong1266@gmail.com>

* fix(ipc): preserve host recovery for LocalSystem clients

Signed-off-by: fufesou <linlong1266@gmail.com>

* test(ipc): cover LocalSystem host profile selection

Signed-off-by: fufesou <linlong1266@gmail.com>

* test(ipc): simplify recovery configuration checks

Signed-off-by: fufesou <linlong1266@gmail.com>

* chore: update hbb_common for configuration setter layout

Signed-off-by: fufesou <linlong1266@gmail.com>

* refactor(ipc): share the list of preserved configuration keys

Signed-off-by: fufesou <linlong1266@gmail.com>

* update hbb_common

Signed-off-by: fufesou <linlong1266@gmail.com>

---------

Signed-off-by: fufesou <linlong1266@gmail.com>
2026-11-29 22:28:40 +08:00
RustDeskandMariano Abad 130b84119b Drmtap packet min (#17286)
* drm: capture multi-plane scanouts with the libdrmtap packet API

KWin 6.8 on Intel can scan a window out of its own plane, above the
desktop (overlay) or below a desktop with a hole (underlay). One dma-buf
descriptor cannot describe that frame: the window was missing, or during
an underlay the window alone was streamed as the whole screen (#17187).

libdrmtap 0.6 grabs every lit plane as an opaque packet plus its fds and
composes them on the unprivileged side. When the loaded libdrmtap has the
packet API, the service sends the packet in the existing dma-buf message
(new field, all fds of the message belong to it) and the consumer converts
it with drmtap_convert_packet. With an older libdrmtap nothing changes.

The fd transport now carries up to 16 fds per message instead of one.
The ABI gate accepts minor 6 next to 5.

* drm: gate the packet path on the libdrmtap ABI level

The loader accepts libdrmtap 0.5.0 up to 0.6.x. When the library exports
drmtap_abi, the level range it serves must include 2 (the 0.6.0 header);
without the symbol it is a 0.5 library, level 1. The packet path is on
only at level 2 or above with its three symbols resolved.

The consumer reads the rotation of a packet frame from its converting
context after drmtap_convert_packet: libdrmtap knows there whether the
frame was composed (rotate-0) or one plane converted as its buffer.

drmtap_convert_packet errors and output checks now match convert():
EAGAIN, EBUSY and EINTR skip the frame instead of demoting the display.

The frame arm sends through drm_send_frame and send_msg keeps its one fd
signature. Comments and two log lines updated for the packet path.

* drm: let build.py package any accepted libdrmtap minor, keep the last frame on E2BIG

build.py required the pinned libdrmtap minor to equal DRMTAP_ABI_MINOR, so raising the
runtime gate to 0.6 made it refuse the 0.5.12 pin. It now accepts the same range as the
runtime loader. grab_packet maps E2BIG (more than four lit planes, none covering the CRTC)
to WouldBlock so the last frame stays, like grab_desc on an underlay.

* build: pin libdrmtap v0.6.0

rustdesk-org/libdrmtap is synced with upstream, so the package can ship
0.6.0 and the packet path runs. Before this, a packaged build carried
0.5.12 and has_packet() was always false.

* drm: turn a composed frame by the primary plane rotation

A frame libdrmtap composed from several planes is the CRTC raster and
answers rotate-0, so it was turned by the wl_output transform. That
transform does not carry the panel orientation: on a panel whose primary
plane rotated in hardware the composed frame came out upside down (180)
or transposed against the session size (90/270), which rebuilt the
session on every frame while an overlay was lit. The CPU path does the
same once it composes.

Enumeration now records the primary plane rotation next to
plane_transposed, read from the same query. A frame answering rotate-0
is turned by that rotation when the plane rotated, else by the output
transform as before. One-layer frames still answer their plane rotation
and are left alone.

* drm: a failed packet convert drops to one descriptor first

A convert error on a packet set prefer_cpu, which kept that monitor on
the CPU path for the rest of the process run. It now sets no_packet: the
next session asks the service for one descriptor (grab_desc) through a
new DrmStart field, and only a failed descriptor convert sets
prefer_cpu. The field defaults to false, so a consumer that does not
send it keeps the packet path.

The ABI gate test checks again that a library below the floor (0.4.x)
is refused.

* build: pin libdrmtap v0.6.1

rustdesk-org/libdrmtap is synced with v0.6.1. It fixes the frame size
of a single plane that is scaled to the screen or smaller than it: that
plane came out at its buffer size and the session was rebuilt.

---------

Co-authored-by: Mariano Abad <weimaraner@gmail.com>
2026-11-29 22:16:20 +08:00
RustDeskandClaude Opus 5.5 a98982d702 ci: a vcpkg binary cache that works for CI runs; drop rust-cache from the Flutter builds (#17300)
* ci: give CI runs a vcpkg binary cache that works, saved from master only

vcpkg removed its x-gha backend, so every run builds the vcpkg ports from
source, 6 to 22 minutes per job. CI runs that publish nothing now restore the
vcpkg binary packages that the last master push saved for the same job,
through vcpkg's files backend and actions/cache, and a run saves only when it
built a package the cache lacked. Builds that publish (nightly, tags) set
VCPKG_BINARY_SOURCES to `clear` and never touch the cache.

rust-cache entries are 1.3 to 2.2 GB each and every PR saved its own, so
within the 10 GB limit they evicted master's and most runs missed. They are
now saved from master only; PRs still restore master's.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkiaGp2k8okvs4MpCUq

* DO NOT MERGE: let this PR's runs save the vcpkg cache, to test restoring it

* ci: drop rust-cache from the Flutter builds; save ci.yml's from master only

In the last two PR CI runs all 20 rust-cache restores in flutter-build.yml
and bridge.yml found nothing, and so did every job of the 2026-11-28 nightly.
Saving the ~2 GB entries still took up to 3.3 minutes per job and kept the
repository's cache above its 10 GB limit, which evicted most of the new vcpkg
entries within an hour of their first save. ci.yml keeps its rust-cache, but
only master saves it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkiaGp2k8okvs4MpCUq

* Revert the temporary save-on-PR commit

With it, this PR's runs saved the vcpkg cache, and a rerun of the Android
x86_64 job restored all 20 packages from it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkiaGp2k8okvs4MpCUq

* ci: keep only the current vcpkg packages in a saved entry; drop the iOS wiring

The save step now deletes the restored zips that no package installed by
this run uses before it saves. Otherwise each compiler, vcpkg commit or
port change carried the whole old set into every later entry, so an entry
grew by a full 32 to 104 MB set per such change, not by a few MB.

The iOS job runs only in builds that publish, where the restore and save
steps are skipped, so its wiring never ran: remove it.

Say that rust-cache rarely hit rather than never: macOS x64 had a hit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkiaGp2k8okvs4MpCUq

* ci: keep the bridge's rust-cache, saved from master only; log the vcpkg pruning

Every platform job waits for generate-bridge, which without rust-cache
compiles cargo-expand and flutter_rust_bridge_codegen from source on every
run (2 to 3 minutes). Its entry is about 1 GB, one per run rather than one
per platform job, so keep it and save it from master only, as ci.yml does.

The vcpkg save step now logs how many zips it kept and removed, and warns
when the status file is missing, so the first master run shows the pruning
working on each platform.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkiaGp2k8okvs4MpCUq

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 22:14:40 +08:00
RustDeskandClaude Opus 5.5 aedb901f10 ci: build published binaries without restoring any cache (#17299)
* ci: build published binaries without restoring any cache

Nightly and tag builds restored rust-cache (which also holds ~/.cargo/bin,
where the bridge's flutter_rust_bridge_codegen lives), the run-vcpkg cache, the
run-on-arch container images pushed to GHCR, and the bridge's Flutter and pub
cache. Other workflow runs can write all of these, so an entry planted by one
of them would end up in a published binary, past the lockfile and hash checks.

With upload-artifact set, those steps are now skipped or told not to cache,
and the cache token is no longer exported to every build step. CI runs without
upload-artifact keep their caches.

The cost is small today: vcpkg's x-gha binary cache backend has been removed
upstream, so every run already builds the vcpkg ports from source, and the
last nightly found no rust-cache entry for any job. What is new is that the
run-on-arch images are rebuilt in every published build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkiaGp2k8okvs4MpCUq

* DO NOT MERGE: run this PR's CI the way a published build runs (no cache)

* Revert the temporary no-cache CI commit

Its CI run (46105502143) built every PR CI job the way a published build now
runs, without any cache, and passed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkiaGp2k8okvs4MpCUq

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 21:32:38 +08:00
RustDeskandClaude Opus 5.5 ef49275ddb ci: pin every external download in the Flutter build workflow (#17298)
* ci: pin every external download in the Flutter build workflow

flutter-build.yml fetched 16 files with curl, wget or Invoke-WebRequest and
checked none of them against a hash kept in this repository: sciter from a
`master` URL, the engine and the web deps from release tags that are
re-uploaded in place, nasm over plain http, the Rust and Flutter tarballs. The
printer driver zips were checked, but against a sha256sums file from the same
release, which whoever can replace the zips can replace too.

Each download is now checked against a SHA-256 written next to it, and the
sciter files come from a fixed commit. The git sources that followed a branch
or a tag (flutter-elinux, CMake for armv7, flathub/shared-modules,
appimage-builder) are pinned by commit, and the last action referenced by tag
(download-syft@v0) by SHA. playground.yml gets the same check for rcodesign.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkiaGp2k8okvs4MpCUq

* ci: fail on a printer driver mismatch and pin the Syft download

With the printer driver hashes now kept in this file, a mismatch is never a
network failure: it is either an update upstream or a replaced file. The step
logged it and built without the driver, so the next in-place update of the
`driver` release would have shipped Windows packages without remote printing
and a green run. It now fails the step. A failed download still skips the
driver, as before. It uses `exit` because the surrounding catch swallows
`throw` and, with $ErrorActionPreference = 'stop', Write-Error too.

anchore/sbom-action/download-syft, even pinned by commit, runs install.sh from
syft's `main` branch in a job with `contents: write`. The step now downloads
the syft 1.42.3 release tarball, the version the action installed, checks it
against a SHA-256 written here, and unpacks it outside the checkout that
`syft dir:.` scans.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkiaGp2k8okvs4MpCUq

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 20:54:32 +08:00
RustDeskandClaude Opus 5.5 7fb571184e ci: enforce the Flutter lockfile in every build (#17294)
* ci: enforce the Flutter lockfile in every build

Every Flutter job now runs `flutter pub get --enforce-lockfile` before it
builds, so a package version or content hash that pubspec.lock does not
pin fails the job instead of being resolved live.

The Flutter 3.44 jobs (Windows arm64, macOS arm64, their bridge) and the
3.22.3 bridge job edit pubspec.yaml on the fly and had no lock for the
result, so the affected packages were resolved at build time. Each of the
two states now gets its lock entries from a diff against
flutter/pubspec.lock, applied where the pubspec.yaml edit is made. Every
other package keeps following the committed lock: a change there either
carries over or fails at `git apply` / `--enforce-lockfile`.

It has to be `flutter pub get`: `flutter packages pub get` only forwards
to `dart pub` and skips the plugin registrant files.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkiaGp2k8okvs4MpCUq

* ci: apply the 3.44 lock diff before any source edit; say what the diffs track

A lock diff that no longer fits now stops apply_flutter_3.44_source_patches.sh
before it edits a source file. Before, common.dart and pubspec.yaml were already
patched and dialog.dart was not, so every later run refused the tree as
partially applied.

The comments said the diffs hold what the pubspec bumps change, but most of
their entries come from the pins of the Flutter SDK itself. Moving one of those
Flutter versions therefore needs the matching diff regenerated; say so next to
each version.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkiaGp2k8okvs4MpCUq

* ci: treat a restored 3.44 pubspec.lock as not patched

The "already applied" check looked at the Dart sources and pubspec.yaml
only, so rerunning the script after restoring just flutter/pubspec.lock
exited 0 with the bumped manifest and the old lock, and the following
`flutter pub get --enforce-lockfile` failed. The early return now also
requires the lock diff to reverse cleanly; otherwise the checkout is
reported as partially patched.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkiaGp2k8okvs4MpCUq

---------

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-29 20:13:34 +08:00
YSSZ da0ae88900 docs: improve Arabic README translation and RTL formatting (#17307)
* Add Arabic RustDesk Server Pro badge

* Add Arabic RustDesk Server Pro badge

* Revise Arabic README with updates and disclaimers

Updated the Arabic README to include new sections, improve translations, and add a disclaimer regarding misuse.

* docs: fix direction marks around release options
2026-11-29 19:54:00 +08:00
RustDeskandClaude Opus 5.5 1210eb292c fix(android): list interfaces without RTM_GETLINK (#17303)
Android 11+ refuses the RTM_GETLINK dump to apps targeting API 30 or
later (SELinux nlmsg_readpriv). The getifaddrs() shim dumped links first
and failed the whole call, so webrtc-util saw no interfaces and WebRTC
offered no host candidates. Two peers behind one NAT then fell back to
the relay.

Dump addresses only, and name each with if_indextoname() and read its
flags with SIOCGIFFLAGS, as bionic's own getifaddrs() does for apps and
WebRTC's ifaddrs_android.cc does everywhere. This drops the link table.

Also report IFA_LOCAL rather than the peer for an IPv6 address that has
one, as for IPv4.

Supersedes #17293, which diagnosed the root cause.


Claude-Session: https://claude.ai/code/session_01JAxkkig1bcC5Xrr1uwX47b

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 21:04:31 +08:00
RustDeskandClaude Opus 5.5 f30effa298 fix(terminal): bump portable-pty so 32-bit Windows calls ConPTY as stdcall (#17302)
The 32-bit Windows terminal helper crashed with SIGSEGV right after it
started (#17296). portable-pty loaded CreatePseudoConsole,
ResizePseudoConsole and ClosePseudoConsole through function pointers
typed extern "C", but these functions are stdcall, so on i686 every call
popped its arguments twice and skewed the stack pointer.

rustdesk-org/wezterm@a181db18 declares the pointers extern "system".
filedescriptor comes from the same repository and moves with it; its
code is unchanged.


Claude-Session: https://claude.ai/code/session_01JAxkkig1bcC5Xrr1uwX47b

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 18:09:12 +08:00
Yi Ling 104ef2a865 fix(fs): compare modified time in whole seconds in write confirmation (#17290)
Signed-off-by: lingyicute <xlyxinglinyi@gmail.com>
2026-11-27 23:50:30 +08:00
21pages 5c680b4d86 Make the idle API heartbeat interval configurable (#17256)
* Make the idle API heartbeat interval configurable

* Send an idle heartbeat when the API server changes
2026-11-27 23:34:34 +08:00
bovirus 45e34a6923 Update it.rs (#17265) 2026-11-26 23:14:19 +08:00
rustdeskandClaude Opus 5.5 a0c0963c48 Add PR evidence check and AI cross-review section
The PR template gets an "AI cross-review" section: contributors list the
models that reviewed the diff besides the one that wrote it, paste the
review output or a share link, and give their decision on each finding.
Findings can be wrong, so they are judged, not applied blindly.

A pull_request_target workflow reads the PR description and file list
(it never checks out PR code) and, for authors without write access,
labels the PR needs-evidence and leaves one polite comment listing what
is missing: test environment and results, reproduction for bug fixes,
AI cross-review, screenshots or video for UI changes, and the approval
link for features. Translation, docs and CI-only PRs skip the test and
review checks. PRs opened before this template are left alone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkkfvhEPKVg85ZHovfs
2026-11-24 23:46:30 +08:00
rustdeskandClaude Opus 5.5 a02f76c48d PR template: ask for cross-review by other AI models
Most PRs are now written with AI, so "reviewed every line myself" is not
realistic. Ask for review by models other than the one that wrote the
code, and for the models used.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkkfvhEPKVg85ZHovfs
2026-11-24 23:20:24 +08:00
rustdeskandClaude Opus 5.5 b03e55e266 PR template: match the "may be closed" wording of discussion #17223
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkkfvhEPKVg85ZHovfs
2026-11-24 23:17:16 +08:00
rustdeskandClaude Opus 5.5 0039611d7b PR template: link the approval and testing policies in visible text
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkkfvhEPKVg85ZHovfs
2026-11-24 23:16:46 +08:00
rustdeskandClaude Opus 5.5 003637af9f PR template: require video or screenshots for UI changes
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkkfvhEPKVg85ZHovfs
2026-11-24 23:15:05 +08:00
rustdeskandClaude Opus 5.5 e5afd9c75b Add pull request template
Point contributors at the feature-approval and real-device end-to-end
testing policies (discussions #17223 and #17225), and ask for the test
environment, steps, results and regression surface in every PR.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkkfvhEPKVg85ZHovfs
2026-11-24 23:12:22 +08:00
rustdeskandClaude Opus 5.5 51f94394ce refact: Remove unused selinux check
The helper card that called it was removed in #17197.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkkfvhEPKVg85ZHovfs
2026-11-23 17:38:04 +08:00
fufesou cc3300d1bb refact: Remove outdated selinux helper card (#17197)
Signed-off-by: fufesou <linlong1266@gmail.com>
2026-11-23 17:15:47 +08:00
RustDeskandClaude Opus 5.5 9724512429 feat(linux): ship DRM capture in every Linux package behind allow-drm-capture (#17089)
* feat(drm): add allow-drm-capture and stop probing _drm when it is off

DRM capture is about to be compiled into every Linux build, so it needs a
runtime switch. `drm_capture_enabled()` reads the new `allow-drm-capture`
option (default off) or `RUSTDESK_DRM_CAPTURE=Y`, which the root service will
set for a greeter `--server`. While it is off the consumer never probes `_drm`:
`availability()` and `availability_cached()` answer Unavailable and the
startup warm returns at once.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P1grQ39ByRWPUtTBdTzEBF

* feat(drm): keep the stock greeter, uinput and cursor paths while allow-drm-capture is off

With drm compiled in, these paths changed even when DRM capture was never
used: a Wayland greeter read as Wayland, the uinput range was set on the
apply thread, `wayland_has_compositor` said no at a greeter, every Wayland
login ran loginctl for the settle, and the cursor cache had a ceiling.
Each now checks `drm_capture_enabled()` and, while it is off, runs the code
a build without drm runs. `check_init`'s stock `match` is only re-indented
under its new `if`; see `git diff -w`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P1grQ39ByRWPUtTBdTzEBF

* feat(drm): start the _drm producer and greeter paths only with allow-drm-capture, restart --server on change

The root service used to start the `_drm` producer at boot, which dlopens
libdrmtap, opens the DRM device and grabs a frame, and to treat a Wayland
greeter as a DRM login screen. Both now wait for allow-drm-capture:

- the producer starts the first time the option is seen on, and
  `handle_drm_conn` refuses peers while it is off;
- when the option changes, the service restarts `--server` and re-reads the
  seat, because every `--server` decides its paths when it starts;
- a greeter `--server` runs as the greeter uid only with the option on, and
  is passed RUSTDESK_DRM_CAPTURE=Y, since its own config has not synced from
  root when `IS_X11` is computed;
- `get_active_userid_fresh`, the greetd detection and the login-Wayland HOME
  lookup follow the option, so with it off they match a build without drm.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P1grQ39ByRWPUtTBdTzEBF

* feat(flutter): add the DRM capture switch to the Wayland settings card and home warnings

Settings > General > Wayland gets a "Use DRM screen capture" checkbox on an
installed Linux client, with the explanation shown below it: it skips the
Wayland screen sharing prompt (the login screen too), may not work on every
device, and switching it disconnects current sessions. Flatpak and AppImage
are not installed builds, so they do not show it.

On the home page, an installed client with the option off now offers an
"Enable" button on the Wayland session and Wayland login screen warnings,
and shows neither warning once it is on. Builds that are not installed, and
clients where the option is fixed, keep the existing warnings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P1grQ39ByRWPUtTBdTzEBF

* feat(lang): add the DRM screen capture strings

"Use DRM screen capture", its settings explanation and the two home-page
warnings that offer it. it.rs is left for its translator, and sc.rs is
left empty rather than guessed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P1grQ39ByRWPUtTBdTzEBF

* build(linux): bundle libdrmtap into the stock packages and drop the unattended-wayland variant

DRM capture is now a runtime option, so the package name no longer has to be
the consent. build.py compiles `drm,drm-wake` into every Linux Flutter build
on the deb and pacman paths (`--no-drm` opts out), and the stock `rustdesk`
deb carries libdrmtap. The yum and zypper paths only build Sciter rpms and
are left alone.

- The variant rename, its Conflicts/Provides on `rustdesk`, the extra
  Depends and the measured libc6 floor are gone: libdrmtap is dlopen-ed and
  falls back to PipeWire when it cannot load, so it must not stop the
  package installing on older systems.
- The stock deb Conflicts/Replaces `rustdesk-unattended-wayland`, so
  installing it takes over from that package.
- `--package` decides from the staged binary whether it is a drm build,
  since it compiles nothing; a Sciter bundle stays as it was.
- The Flutter rpm specs and PKGBUILD install libdrmtap into
  /usr/lib/rustdesk, and the rpms exclude it from auto-generated
  Requires/Provides.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P1grQ39ByRWPUtTBdTzEBF

* ci(linux): build every Linux package with drm and run the drm tests in the main job

build-rustdesk-linux now builds libdrmtap on the runner (x86_64 and
aarch64), compiles `drm,drm-wake` into the release library and packages the
library into the deb and both rpms; arch gets it through PKGBUILD. The
separate build-rustdesk-linux-drm job is gone, along with the
rustdesk-unattended-wayland deb it published.

- The drm-gated unit tests (`run_drm_tests`) move into the x86_64 build
  container unchanged.
- A step checks that the deb carries libdrmtap and a binary that dlopens
  it, and each rpm is checked for the library and, on x86_64, for a glibc
  requirement newer than the build container's.
- x86_64 uploads its deb on a PR too, as the drm job did, so a PR's build
  can be installed and tested.

AGENTS.md now points the drm test rule at the x86_64 build job.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P1grQ39ByRWPUtTBdTzEBF

* refactor(drm): keep start_os_service's diff to the producer move, check the cursor ceiling cheaply first

DrmCaptureSwitch now sits after start_os_service, so the diff there reads as
the producer spawn leaving and the poll arriving. The cursor-cache ceiling
compares the cache length before it locks DRM_STATE.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P1grQ39ByRWPUtTBdTzEBF

* fix(drm): load the custom client before is_x11() can read Config, offer DRM only where it is compiled in

`IS_X11` now asks `drm_capture_enabled()`, which reads Config, and it is
computed in `global_init()`. `core_main()` ran that before
`load_custom_client()`, so on a Linux custom client the config loaded from
the stock "RustDesk" path before the app name was set and was never
reloaded; the root then synced that copy over the client's own settings.
Load the custom client first. On Windows and macOS `global_init()` does
nothing, so only the Linux startup order changes.

The DRM checkbox and the home-page "Enable" cards also showed on installed
builds without the drm feature (NixOS, source builds, --no-drm), where the
option has no effect. They now also need `is-drm-capture-supported`, a new
`main_get_common` key that reports whether drm is compiled in.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P1grQ39ByRWPUtTBdTzEBF

* fix(flutter): keep the DRM switch behind disable-settings, ask loginctl once per build

disable-settings hides the Security tab but not General, so the Wayland card's
checkbox and the home Enable button both stayed reachable on a locked custom
client. With settings disabled the home page falls back to the stock Wayland
warnings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P1grQ39ByRWPUtTBdTzEBF

* fix(drm): offer DRM only where libdrmtap loads, keep the stock check_init apply verbatim

- is-drm-capture-supported also requires the bundled libdrmtap to load, so a
  host whose glibc is older than its build is not offered a switch that does
  nothing.
- Dispatch the Wayland probe before load_custom_client: the probe child must
  run before any other startup work.
- check_init keeps master's not(drm) apply untouched; the drm build carries its
  own copy for allow-drm-capture off.
- drm_capture_enabled's doc names the Wayland enumeration in base and scrap,
  which does not read the option.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P1grQ39ByRWPUtTBdTzEBF

* ci(linux): catch any glibc 2.28+ requirement in the rpm drm check

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P1grQ39ByRWPUtTBdTzEBF

* fix(drm): initialize libsodium before the custom client's signature check

core_main now loads the custom client ahead of global_init, which since
#16974 starts with init_sodium so nothing uses libsodium before it. Run it
first there too; a second sodium_init() is a no-op.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P1grQ39ByRWPUtTBdTzEBF

* fix(drm): follow allow-drm-capture in the startup warm and in running streams

- warm_availability reads the option inside its retry loop. It starts
  before the initial config sync from root, so a --server whose account
  config does not hold the option yet (a greeter account that gets no
  RUSTDESK_DRM_CAPTURE, or an account not yet synced) skipped the warm
  for its whole life and paid the cold probe on its first connection.
- handle_drm_conn checks the option per frame, next to the peer re-auth,
  so turning it off ends a stream that is already running rather than
  only refusing new ones.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P1grQ39ByRWPUtTBdTzEBF

* test(drm): skip the option-off test where the option is on

drm_capture_enabled() reads the real config and RUSTDESK_DRM_CAPTURE, so
the test failed on a machine that has DRM capture turned on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P1grQ39ByRWPUtTBdTzEBF

* fix(drm): leave running streams to the --server restart

Drop the per-frame allow-drm-capture check added in 3d1469255. The root
sees the option flip before its service loop restarts the --server, so
the check ended the stream up to one loop pass early and the consumer
spent that time failing to rebuild a capturer before the restart
disconnected the session anyway. It also took CONFIG2's read lock on
every frame, which Config2::set_options holds for writing across its
disk write. The comment now says what turning the option off does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P1grQ39ByRWPUtTBdTzEBF

* ci: run the drm and unix-file-copy-paste tests in the CI workflow

Move them out of the Linux package build into ci.yml's x86_64 Linux job,
which already has vcpkg and the build dependencies. The drm feature only
dlopens libdrmtap, so the tests need neither the bionic container nor
the library. A failing test no longer stops the deb, rpm and Arch
packages or skips appimage and flatpak.

The step runs every test of each package with the feature on instead of
selecting modules by name, so run_drm_tests and its guard against a
filter that matches nothing are gone, and so is the AGENTS.md rule
about it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P1grQ39ByRWPUtTBdTzEBF

* fix(drm): hand an allow-drm-capture change made as root to the service

The service decides on DRM from its own copy of the config, which only a
non-root --server syncs. A root process that changed the option -- the CLI
(`sudo rustdesk --option`), or a root --server at a login screen applying a
strategy -- left the service on the old value, so the change never took effect
there, and the next store by the service overwrote it in the file.

Such a process now sends its config to the service over the existing SyncConfig
when the option changed. Non-root processes and changes to other options do
nothing more.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P1grQ39ByRWPUtTBdTzEBF

* build(drm): recommend the GL libraries the old variant depended on

rustdesk-unattended-wayland depended on libdrm2, libegl1 and libgles2. The
package that replaces it now recommends them: libdrmtap opens EGL lazily, so they
stay optional, but apt still installs them by default and autoremove keeps them.

AGENTS.md keeps the rule that a test behind a feature no CI build enables needs a
cargo test line, now pointing at ci.yml.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P1grQ39ByRWPUtTBdTzEBF

* build(drm): recommend the GL libraries in the rpm and Arch packages too

The rpm specs recommend libdrm, libEGL and libGLESv2 by soname, since Fedora and
openSUSE name the packages that provide them differently; dnf and zypper install
weak dependencies by default. PKGBUILD lists libdrm and libglvnd as optdepends,
which pacman only reports.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P1grQ39ByRWPUtTBdTzEBF

* fix(drm): hand the option to the service only from a current copy of the config

SyncConfig carries the whole config, and the service stores it and takes its
trusted-device grants as authoritative. A root UI held the copy it loaded at
startup, so turning the option on or off there could restore a revoked trusted
device or an older permanent password. Its view of the option could also differ
from the service's, so a change could be skipped.

The push now runs in the root --server's handler of an options update, the
process that holds the config, also when the update is rejected after the
options were applied. `sudo rustdesk --option` still pushes by itself, since it
has just loaded the config and can run before any --server is up. A UI never
pushes, including a GUI started with sudo that hosts the IPC itself: a change
made there does not reach the service.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P1grQ39ByRWPUtTBdTzEBF

* ci: check the archlinux package carries libdrmtap

PKGBUILD skips libdrmtap when it finds none, so a tag or nightly build could
publish an Arch package without it while every step passed. Check its contents
as the deb and rpm steps do.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P1grQ39ByRWPUtTBdTzEBF

* fix(drm): send the service the trusted-device grants on disk

SyncConfig(Some(..)) makes the service write the sender's grants as
authoritative. `sudo rustdesk --option allow-drm-capture ...` loads its
config at start and pushes only after its IPC round trips with the
--server, so a grant written in that window (a 2FA trust just granted, a
device just removed) was reverted by the push.

Read the grants from disk, as the service's own SyncConfig(None) reply
does; the service then finds them equal to what it holds and writes
nothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P1grQ39ByRWPUtTBdTzEBF

* fix(lang): say unattended access in the Lithuanian wayland-drm-tip

"Automatinis prisijungimas" is this file's "Auto Login", so the tip read
as advice about automatic login. "Neprižiūrima prieiga" matches the
English source and the file's "prieiga" for access.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P1grQ39ByRWPUtTBdTzEBF

* fix(core_main): load the custom client early only with drm

Only a Linux drm build reads Config in global_init (the IS_X11 greeter
override reads allow-drm-capture), so only there must the custom client
load first. Every other build keeps master's order.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P1grQ39ByRWPUtTBdTzEBF

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 13:24:48 +08:00
Thejesh 66fabdf305 docs: move video codec from hbb_common to scrap in README file structure (#17189)
Signed-off-by: thejesh23 <35212698+thejesh23@users.noreply.github.com>
2026-11-23 09:34:55 +08:00