refact, option, allow linux headless

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou
2023-07-29 13:06:18 +08:00
parent 3c4852a254
commit c15e3c306e
5 changed files with 106 additions and 63 deletions

View File

@@ -75,7 +75,9 @@ impl RendezvousMediator {
}
#[cfg(all(target_os = "linux", feature = "linux_headless"))]
#[cfg(not(any(feature = "flatpak", feature = "appimage")))]
crate::platform::linux_desktop_manager::start_xdesktop();
if crate::platform::is_headless_allowed() {
crate::platform::linux_desktop_manager::start_xdesktop();
}
loop {
Config::reset_online();
if Config::get_option("stop-service").is_empty() {