* annotation: answer viewer draw RPCs and draw strokes on an X11 overlay
The official viewer's watch-mode annotation (批注) sends RpcRequest 27
draw_req, which this host never answered, so the viewer reported
批注开启失败 (9998). The schema is taken from the Mac 4.42.0
UURemoteService SwiftProtobuf metadata. Replies go on TEXT because a
reply on CONTROL times out.
Strokes are drawn on a click-through override-redirect ARGB window,
which needs a compositing manager. The window exists only while
annotation is on and is removed when the desktop session ends.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* annotation: follow root resizes and scope resets to the owning peer
Addresses the Codex review on #174.
- A RandR resize (on X11 the viewer's resolution choice does this) left
the overlay at its old size. The overlay now watches root
ConfigureNotify and is rebuilt at the new geometry. Strokes keep the
viewer's points and are laid out again.
- A delayed reset from a replaced desktop peer could remove the
annotation of the viewer that took over. Requests and resets now carry
the peer (its PeerActions address), and only the owner's reset,
toggle-off or clear applies.
The ignored overlay smoke test covers both cases. It always checks the
owner takeover, and checks the resize when UU_ANNOTATION_SMOKE_RESIZE is
set on a disposable display.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
---------
Co-authored-by: Claude Opus 5.5 <[email protected]>
* fix(privacy): match recorded input devices after a reboot
The recovery record stores KWin's `eventN` sysNames, but udev renumbers
them between boots. A record replayed after a reboot (privacy was on at
shutdown) then set `enabled` on a device path that no longer exists; the
restore failed, kept the record, and every later switch failed at the
same step. The device that had been blocked could also stay disabled.
Records now keep name/product/vendor next to the sysName, and a restore
matches the current device by that identity, falling back to the exact
sysName for older string-only records. A device that no longer exists is
skipped with a log line instead of failing the restore, so the record,
the guard and the outputs are cleaned up; a device that exists but cannot
be enabled still fails and keeps the record for the next attempt.
Verified by replaying records with the release build on KDE Plasma 6.8: a
stale `event14` for a mouse now on `event12` is re-enabled and the record
removed; a record for a missing device logs the skip and restores
normally. `cargo test --features wayland,portal`: 330 passed, 10 ignored.
* fix(privacy): restore every device sharing an identity
- enable every current device whose identity matches a record entry,
deduplicated by sysName: two record entries can describe one device, and
one identity can cover several (identical keyboards, or a receiver
exposing several event nodes under the same name)
- a failed property read during restore is an error instead of a missing
device, so the record and the guard stay for the next attempt; blocking
keeps the lenient read
- the gone-device warning logs a count only, matching the log-privacy rule
* fix(privacy): re-enable readable devices before reporting incomplete enumeration
A failed property read during restore no longer aborts enumeration before
set_sys runs: the readable matching devices are re-enabled first, then the
incomplete read is returned as an error so the record and the guard stay
for another attempt. Blocking still skips unreadable devices.
* input: park the pointer worker until pointer or gesture work exists
A fixed 4 ms tick kept ~250 wakeups/s (clock_gettime storms, worker
steal spins, pow-heavy flush math) burning ~3% CPU on an idle host with
no viewer connected. The worker now parks on a Notify permit until a
pointer/scroll/button event or a live touch gesture needs the 4 ms
cadence; notify_one permit semantics make the park check race-free.
Sub-notch scroll residue cannot inject alone, so it parks too.
* fix(input): preserve pointer wake ordering and motion cadence
Hold the serial lock before notifying button transitions so a parked worker cannot miss a newly pending gesture. Keep the 4 ms coalescing cadence until an empty tick and reset the interval after each parked phase.
Add regression coverage for button wake ordering, 1 ms motion streams, and idle cadence reset using Tokio test-only clock control.
---------
Co-authored-by: ferstar <[email protected]>
* fix(privacy): keep the cover window out of the task manager
The cover is a plain Wayland toplevel and GTK's skip-taskbar hint is X11
only, so KWin listed it: the task manager showed an unidentified window
(class uuremote-server, caption "uu-remote-linux privacy") with the icon
theme's generic "wayland" icon, a yellow W in Papirus.
Mark the window through KWin scripting after the cover reports ready. The
same one-shot script mechanism already moves windows to the virtual output.
Failure only logs; the cover itself is unaffected.
Verified on KDE Plasma 6.8 Wayland: setting skipTaskbar on the running
cover removes the task manager entry immediately, and the entry returns
when a new cover window is created without the fix. `cargo test --features
wayland,portal`: 320 passed, 10 ignored.
* fix(privacy): match every cover window, not just the first caption
Picture mode creates one cover per physical monitor with the same title,
and KWin appends " <2>" and similar suffixes to duplicate captions, so the
exact match skipped every cover after the first on a multi-monitor host.
Match the title as a prefix instead.
* fix(privacy): report the cover ready only after its windows are mapped
The child wrote "ready" before gtk_main(), so the host marked skip-taskbar
while KWin may not have listed the cover yet; a cover that mapped later
kept the task manager entry. Pump the pending GTK events to map the windows
before the handshake, and run the mark script a second time to catch a
compositor-side delay.
* feat(privacy): auto-enable the privacy screen on desktop connect
`UU_PRIVACY_AUTO=picture` / `screen-off` (or 2 / 3) enables the privacy
screen when the first desktop controller connects. Off by default. The
switch waits for the portal capture session and retries while it is
missing; the viewer's own RPC 7 cancels a pending auto-enable for that
session.
The privacy state poller that pushes SystemMetrics and SystemStateChange
now starts for desktop peers too (it only ran for a tool peer promoted to
desktop), and it pushes once on its first tick. A mode the viewer did not
request, such as an auto-enable, therefore reaches its menu, and the
state message also goes to TEXT, which viewers read for privacy replies.
Verified on KDE Plasma Wayland with an iOS viewer: auto picture and auto
screen-off both engage, the menu reflects the mode after the push, and a
disconnect restores the physical outputs. `cargo test --features
wayland,portal`: 320 passed, 10 ignored.
* fix(privacy): let a viewer request win against auto-enable races
Two paths could still override an explicit choice:
- the override was checked before acquiring STATE, so an RPC 7 applied in
that window could disable privacy and the auto thread could turn it back
on; the check now happens inside the same lock that enters the mode
- `session_started` captured the override counter as its baseline, so a
request that arrived after CONTROL opened but before the session counter
started was treated as unrelated and auto-enable ran anyway; the counter
is now a flag set by any RPC 7 and cleared only when the last desktop
session ends
docs/privacy-screen.md now says remote-assistance (guest) sessions are
covered too, and that supported hosts push the current privacy state once
on every desktop connect.
The WebSocket transport already reduces errors to a category or HTTP status
without the token or endpoint, so log it instead of 'details omitted' to tell
a refused upgrade from a network failure (#166).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A CF_UNICODETEXT name made the Windows viewer register a custom
clipboard format instead of using id 13, so Linux text never reached
the standard Unicode format. Fixes#151.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* feat(audio): capture and encode Opus in process
* feat(portal): encode VAAPI from leased DMA-BUF frames
* fix(input): route Portal controls and committed ASCII through uinput
* docs(portal): shorten setup notes and colocate hardware acceptance guidance
* fix(input): preserve GNOME IME guard for committed uinput text
* build: link pulse/opus after the static C archive (--as-needed)
GNU ld with --as-needed (Ubuntu default) drops shared libraries listed before
libx11_engine.a, so --features inproc-av failed to link with undefined gbm_*,
xcb_dri3_* and xcb_damage_* on Ubuntu (found on aarch64; Arch is unaffected).
Co-authored-by: ferstar <[email protected]>
SDL viewer forwards one mapped controller (gpd_connect/gpd_update/gpd_disconnect) and receives two-motor gpd_vibration over the existing CONTROL channel. Default off (UU_VIEWER_NATIVE_GAMEPAD=1).
Replayed as touch, a phone drag scrolled in browsers but still selected
text in VTE terminals (Ptyxis, GNOME Terminal), as on a real touchscreen.
By default on the portal backend the host now decides per press: moving
past 12 px within 450 ms scrolls smoothly (NotifyPointerAxis or EIS
scroll, content follows the finger, `finish` on release so clients may
coast), holding still selects with button 1 down, and a short press
clicks. This works in terminals too and needs no touchscreen consent.
UU_TOUCH_INPUT=touch keeps the touchscreen replay (with its one-time
consent upgrade); UU_TOUCH_INPUT=0 keeps plain mouse drags.
* portal: mobile touch-mode drags become touch, consent asks once for it
In touch mode the Android viewer sends a finger as a left-button drag at
absolute positions (observed: press, mouse_move_absolute stream, release),
which on GNOME selects text instead of scrolling. SelectDevices now also
asks for the touchscreen type where AvailableDeviceTypes offers it, and a
drag from an Android/iOS controller (controller_platform 2/3) that follows
absolute motion is replayed as one finger through NotifyTouch* or EIS
touch, so the desktop scrolls and taps as on a touch screen. Relative
motion (the trackpad mode) and every other viewer keep mouse buttons.
A consent saved before this restores keyboard and pointer only. The first
mobile drag then asks the host once per run in the background (GNOME's
share dialog, also visible on the phone; the consent timeout closes it)
and swaps the new session in only when it grants the touchscreen for the
same monitor and size. The saved consent is never removed beforehand.
UU_TOUCH_INPUT=0 keeps mouse drags and never asks.
* input: type mobile IME text as portal keysyms on Latin GNOME layouts
Each mobile text_input was set as the clipboard and pasted with
Shift+Insert, which VTE terminals bind to the PRIMARY selection: text
typed from the phone into a terminal pasted whatever was last selected
(observed: a selected line of box-drawing characters for every letter).
When GNOME's active input source (first of mru-sources) is a Latin xkb
layout, printable ASCII, newline and tab now go through
NotifyKeyboardKeysym, where Mutter picks the key and Shift level of the
active layout. Other text, IBus engines, KDE and EIS sessions keep the
clipboard paste, which no longer replaces the clipboard for plain typing.
* portal test: accept libei before 1.3 rejecting a touch outside one of two regions
libei 1.2 (Ubuntu 24.04, CI) accepts a touch only inside every region of the
device; 1.3.0 checks any region. The harness device also carries a region for
another screen, so the older library rejects the touch with a client-bug
diagnostic. A real one-stream session has one region.
The host starts every session at the official defaults (Auto, 60 fps,
4:2:0), so a choice made for a slow link was lost on reconnect. Save them
in viewer.json with the other preferences and send the ones that differ
once CONTROL answers the echo.
* viewer: decode at the host's native size and filter window scaling
Every frame was scaled into a fixed 1920x1080 canvas and SDL then stretched it
to the window with nearest-neighbour sampling, so remote text looked uneven and
blurry. Decode at the native size (read from ffmpeg's verbose scaler line),
restart the decoder when the host resolution changes, and use linear render
scaling. UU_VIEWER_SIZE keeps the fixed canvas, now resampled with Lanczos.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* Add Chinese/English UI language
All GTK windows (viewer launcher, tool windows, host main window and QR login)
and viewer messages are available in Chinese and English. The language comes
from UU_LANG, the choice saved in Settings -> General, then the locale.
README: document the fork's changes and language selection.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* Host main window: add the language selector
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* viewer: control center, network status, loading screen, device previews
In-window chrome drawn on the SDL canvas with a fontconfig font (ab_glyph):
- loading animation with the connection stage instead of a black window
- control center (Ctrl+Alt+M or the top tab): quality, fps, true color,
resolution, fit/1:1, volume, auto lock and host mute (SimpleAction 19,
14/18/16), system shortcut grab, file transfer, watch mode, full screen,
disconnect
- network status panel (Ctrl+Alt+G): time, route, fps, bitrate, RTT, loss
- launcher device previews from the last remote picture (local 0600 cache)
- viewer sign-in keeps the local host user service running, so this
computer joins the account's device list; the settings switch controls it
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* viewer: compact cascading control center
Narrow category list with an options card beside the selected row, sized to
its content; opaque cards with a hairline border and soft shadow, so the
remote picture no longer shows through.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* viewer: keep the control center responsive; resync on a key frame
The menu was rasterized on every mouse event just to hit-test it; hit testing
now uses the layout alone and the drawn menu is cached until what it shows
changes. A stalled UI overflowed the access-unit queue, and the reset decoder
then smeared P-frames into blocks; after a reset it now waits for an IDR/IRAP
while requesting key frames. The tab icon is drawn, since fonts without U+2630
showed a box.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* viewer: measured RTT, no crash on closing tool windows, account card
webrtc-ice never measured the round trip, so the network panel always read
'RTT --'. Binding responses now record it on their pair, and the selected
pair is pinged when the sample is older than the keepalive interval, since
a streaming pair never idles (vendor/webrtc-ice/PATCHES.md).
On Wayland, libdecor's GTK plugin drew SDL's title bar with GTK3 from SDL's
thread while the file window ran gtk_main on its own; closing that window
crashed in GTK's style code. GTK builds now offer libdecor only the cairo
plugin unless LIBDECOR_PLUGIN_DIR is set.
Settings > General gets an Account card with the signed-in user and Sign out.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* README: keep the language section, without the fork notes
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* viewer: English server errors in the English UI; stable type_ipc tests
UU servers answer in Chinese only. The English UI now translates the known
messages (2002 target already controlled, assistance refusals) and shows the
code for unknown ones instead of Chinese text.
type_ipc tests shared one temp directory per process and read
XDG_RUNTIME_DIR while another test pointed it at a planted directory; each
call now gets its own directory and socket tests hold the environment lock.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* viewer launcher: switching the language restarts the launcher
The choice was saved but took effect only on the next start, so the window
seemed to ignore it. The launcher now re-executes itself in place; session
windows are separate processes and stay connected.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* viewer: show pictures as soon as decoded; coalesce mouse motion
The raw-stream parser closed an access unit only when the next began, and
frames were collected only when another one arrived, so a single remote
change (a typed letter) waited for the next one. An access unit delimiter
now follows each unit and the loop drains finished frames between units.
Motions within one 8 ms poll collapse to the newest position (click order
kept), so a drag no longer queues behind itself on a relayed path.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* viewer launcher: hosting is opt-in
Signing in to the viewer no longer installs or enables uuremote-native.service.
Only the Settings switch enables or disables it, and the unit's enabled state is
the saved choice, so turning it off survives a restart. A new sign-in restarts the
host only when the user turned it on and it is running.
PATCHES.md: the RTT keepalive also runs on the host; checked with the official
Android client controlling a Linux host.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* viewer: drop SDL event types sdl2 0.37 does not define
sdl2 0.37 transmutes every event type into SDL_EventType. sdl2-compat on SDL3
delivers types SDL 2 does not define (0x207), which is undefined behaviour and
aborts with debug checks (clipboard_requests_use_existing_window on Fedora 44).
Poll raw events and skip those types before the crate converts them.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* Keep the package version at 0.2.39
The maintainer sets the version at release time.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
---------
Co-authored-by: Claude Opus 5.5 <[email protected]>
* portal: switch monitors on GNOME, precise touch, stop sharing when idle
GNOME grants one monitor per portal consent and refuses multi-select, so
each Mutter monitor gets its own saved consent (gnome@<connector>). The
monitors are advertised as screens; a switch opens that monitor's session
(silently once consented, GNOME asks on the host the first time) and swaps
it into the shared PortalSession, whose frame size follows the monitor.
Absolute motion and clicks go through the portal session: a uinput tablet
spans every monitor, and clicks on the separate uinput queue could land
before the compositor moved the pointer.
An idle watch ends the portal session (screen-share indicator off) once no
desktop controller is left for two checks; the next one reopens it with the
saved consent.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* portal: stop screen sharing as soon as the last controller leaves
The idle watch stays as the fallback for controllers that vanish without
a release event.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* portal test: accept the runtime-engine message in portal builds
Co-Authored-By: Claude Opus 5.5 <[email protected]>
---------
Co-authored-by: Claude Opus 5.5 <[email protected]>
The official iPhone viewer sends RpcRequest case 15 SendVideoTrackReq (no
fields) right after CONTROL opens. Without it a second session only joins the
stream already encoded for another viewer: no SPS/PPS/IDR, so it stays black.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A TLS-inspecting HTTP proxy re-signs the TURN certificate with a CA that the
host's administrator installed in the system store; OpenSSL accepts it while
the bundled Mozilla roots alone fail with UnknownIssuer.
Co-Authored-By: Claude Opus 5.5 <[email protected]>