* 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]>
Upstream webrtc-ice only gathers UDP relays. Forced-relay sessions also offer
turns:<ip>:<port>?transport=tcp, the only media path on hosts whose UDP cannot
reach the TURN servers but whose TCP goes through an HTTP proxy. Vendor
webrtc-ice 0.10.1 with a TCP/TLS dialer (optional HTTP CONNECT) that frames
STUN/ChannelData for the unchanged turn client. Certificates are chain-verified;
a name mismatch is accepted only for IP-literal TURN URLs. Enabled only with
UU_USE_PROXY=1; default UDP gathering is unchanged.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
XShmAttach fails asynchronously with BadAccess when the X server cannot reach
the segment (for example a server in another container); Xlib's default error
handler exited the host before the existing XGetImage fallback could run.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A session that joins a host already streaming to another viewer can receive a
clean stream with no IDR in flight, so the loss-driven PLI never fired. Ask
every 30 access units until something is presented, and warn after 300.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Route host and viewer WebSocket signaling through the shared reqwest client so UU_USE_PROXY=1 applies to signaling as well (HTTP/HTTPS proxies only, no direct fallback, no redirects, strict upgrade validation). ICE/WebRTC media is not proxied.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Count only top-level hosts (helpers such as the Wayland capture process and
the login window are children) and explain that two instances with one
identity kick each other out of the room.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The host re-execs through /proc/self/exe, so its process name becomes "exe"
and pgrep -x uuremote-server missed duplicate hosts.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Classify QR request failures (timeout/connect/decode/body/request) with phase, elapsed time and HTTP/API status only; never print tickets, URLs or server content. Extract and test the polling decisions; keep the 60 s timeout and official refresh behaviour.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* Wayland: type mobile text_input via clipboard paste on Portal and compositors without spare keycodes
* Wayland: address review comments for mobile text_input clipboard fallback
- Guard external clipboard commands in unit tests to eliminate desktop side effects
- Narrow paste fallback to Wayland and Portal backends only
- Document clipboard override and two-way sync behavior in README (both zh and en)
- Unify disable switch via UU_WAYLAND_TEXT=0
---------
Co-authored-by: shofukantkts <[email protected]>
Wayland shows a toplevel only after its first buffer, so a stream that never
yields a picture left no window at all. Present a black buffer on creation and
on resize/expose while no frame has arrived.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Tiling or maximizing the SDL viewer resized the surface, but nothing was
drawn until the next decoded frame, so a static remote desktop stayed blank.
Repaint the last frame on SizeChanged/Resized/Exposed/Maximized/Restored.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
After a network change the DNS/TCP/TLS/upgrade could stall forever after
room credentials were acquired; the reconnect loop never retried. The
handshake now fails after 20s and the existing 5s retry takes over.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A tool peer promoted by capture_desktop stayed marked as the desktop after its
encoder exited on its own (Wayland capture failing while locked/DPMS off), so a
later capture_desktop on the same peer only logged and never restarted the
video. Treat a finished stream task as ended: capture_desktop asks for the
desktop again and promote() restarts the video on the existing input lease.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The ICE transport state callback was created before the DTLS transport and
captured the default placeholder, whose state never leaves New. Every later
ICE change therefore computed the peer state against a "New" DTLS: after a
brief ICE Disconnected -> Connected the PeerConnection settled on New instead
of Connected, so the idle room renewal treated the still-working
port-mapping peer as idle and tore the room down.
Wire the callback to the real DTLS transport through a weak slot filled right
after it is created.
Fixes#109
Co-Authored-By: Claude Opus 5.5 <[email protected]>
SDL MouseWheel events had no arm in the event translator, so wheel input was dropped. Send one notch as 120 wire units (the Mac convention), use SDL's precise deltas for trackpads, honour the flipped direction for natural scrolling, and keep the existing focus and view-only gating.
The CLI decoder pads every frame into a fixed 1920x1080 canvas so rawvideo frames have a known byte length. Input mapping and the SDL viewport treated that padded canvas as the picture, so non-16:9 hosts (official Macs are usually 16:10) had the pillarbox bars inside the 0..1 range: the remote pointer lagged inward and the error grew towards the screen edges.
Parse the coded picture size from ffmpeg's one-time "Video:" stream line, carry it on Frame.content, and render/map only the content sub-rectangle. 16:9 streams are unchanged; UU_VIEWER_SIZE keeps working.
* Signaling: keep heartbeat detection alive when delivery stalls
The receive loop awaited event_sender.send() without a bound. When the main loop was parked in PeerConnection::close after a released peer, the 64-slot event queue filled and the receiver blocked inside the loop body, so the Engine.IO deadline in the same select! never ran. The host stayed online with a half-closed socket for hours.
- add a watchdog over the last inbound frame, independent of the receive loop
- bound event, pong and control sends with a timeout or try_send
- timeout PeerConnection::close so one dead peer cannot stall signaling
- regression test with a blocked event consumer
Co-Authored-By: Claude Code <[email protected]>
* Signaling: always report Disconnected when the receiver stops
The receive loop can break without enqueueing Disconnected: event delivery exceeded SEND_STALL_TIMEOUT, or the writer already stopped. receiver_done then lets the watchdog exit, while the main loop's rx_event stays open because the idle-renewal timer holds a sender. The host stays in a dead room until the 15-minute renewal, which is deferred while a peer is connected.
Hand a Disconnected off from a detached task after every loop exit. Duplicates are harmless: the main loop breaks on the first one and drops the old receiver.
The new test keeps the consumer blocked past SEND_STALL_TIMEOUT, then drains the queue and expects Disconnected.
Co-Authored-By: Claude Code <[email protected]>
---------
Co-authored-by: Claude Code <[email protected]>
The 100-500 kbit NVENC default squeezes a 1440p IDR into ~62 KB, so the
picture blurs and sharpens once per GOP. Share the VAAPI buffer parser so
UU_NVENC_BUFFER_MS (10-1000 ms of the bitrate cap) applies to the FFmpeg
pipeline and the in-process engine; default unchanged.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
When a port-mapping connection is already open, the Mac viewer opens the desktop by sending SimpleAction 4 (capture_desktop) on that connection's CONTROL channel instead of a new offer. The host now promotes that tool connection to the desktop: video, cursor, TEXT clipboard (with the capability echo replayed) and session counting follow a per-peer active flag. A later desktop demotes it without closing its port mappings. Stream tasks are fenced by an abort handle, and the X11 capture is rebuilt if the screen size changed.
Co-Authored-By: Claude Opus 5.5 <[email protected]>