mirror of
https://github.com/VallierDev/uu-remote-linux.git
synced 2026-11-17 09:10:41 +01:00
Headless mode, virtual desktop scripts, tool peers without a desktop
- UU_DESKTOP_BACKEND=none: host goes online without a display; terminal, file transfer and port mapping stay available, desktop offers are ignored. - Tool peers (file/terminal/port mapping) get a nominal ScreenSources/CaptureChange and Allow permissions when no desktop is available: the port-mapping viewer aborts otherwise (also affected portal hosts before local consent). - x11_engine: an explicit DISPLAY that cannot be opened no longer falls back to :0/:1 (would silently capture the physical screen). - contrib/virtual-desktop: Xvfb + desktop session on the systemd user bus (or a private dbus-run-session bus) and a uuremote-native drop-in. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
49edf1d389
commit
26d4812480
7 files changed
+89
-7
No files matched your search
+7
-1
@@ -205,7 +205,9 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
}
|
||||
log::info!("Starting uu-remote-linux host v{}...", env!("CARGO_PKG_VERSION"));
|
||||
|
||||
let mut capture = Arc::new((if desktop_backend::detect()?==desktop_backend::DesktopBackend::Portal
|
||||
let mut capture = Arc::new((if desktop_backend::headless() {
|
||||
Err("headless mode (UU_DESKTOP_BACKEND=none)".to_owned())
|
||||
} else if desktop_backend::detect()?==desktop_backend::DesktopBackend::Portal
|
||||
&& std::env::var("UU_PORTAL_PREAUTHORIZE").ok().as_deref()!=Some("1") {
|
||||
Err("Portal screen access requires a desktop connection and local consent".to_owned())
|
||||
} else { ScreenCapture::new() }).unwrap_or_else(|error| {
|
||||
@@ -359,6 +361,10 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
}
|
||||
let stale_portal=capture.portal.as_ref().is_some_and(|session|!session.is_alive())
|
||||
&& crate::session_lock::locked_now() == Some(false);
|
||||
if desktop && desktop_backend::headless() {
|
||||
log::info!("Desktop connection ignored: headless mode (terminal, file transfer and port mapping remain available)");
|
||||
continue;
|
||||
}
|
||||
let session_capture=if desktop && (capture.init_error.is_some() || stale_portal) {
|
||||
if stale_portal {
|
||||
input.release_held();input.bind_portal(None);
|
||||
|
||||
Reference in new issue
Block a user