Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
rustdesk committed Oct 6, 2024
1 parent ba83236 commit e7353be
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/platform/linux.rs
Original file line number Diff line number Diff line change
Expand Up @@ -610,8 +610,17 @@ pub fn get_env_var(k: &str) -> String {
}
}

fn is_flatpak() -> bool {
std::env::var("FLATPAK_SANDBOX_DIR").is_ok() ||
std::env::var("FLATPAK_ID").is_ok() ||
std::env::var("FLATPAK_SESSION_BUS_ADDRESS").is_ok()
}

// Headless is enabled, always return true.
pub fn is_prelogin() -> bool {
if is_flatpak() {
return false;
}
let n = get_active_userid().len();
n < 4 && n > 1
}
Expand Down

0 comments on commit e7353be

Please sign in to comment.