Skip to content

An open-source remote desktop application designed for self-hosting, as an alternative to TeamViewer.

fix: terminal connection on Linux and MacOS (#12307)

fufesou65c721e08871
diff --git a/src/server/connection.rs b/src/server/connection.rs
index 9daf24f78..eedb77995 100644
--- a/src/server/connection.rs
+++ b/src/server/connection.rs
@@ -1981,7 +1981,7 @@ impl Connection {
o.terminal_persistent.enum_value() == Ok(BoolOption::Yes);
}
self.terminal_service_id = terminal.service_id;
- #[cfg(target_os = "windows")]
+ #[cfg(not(any(target_os = "android", target_os = "ios")))]
if let Some(msg) =
self.fill_terminal_user_token(&lr.os_login.username, &lr.os_login.password)
{
@@ -2943,6 +2943,12 @@ impl Connection {
true
}
+ #[cfg(any(target_os = "linux", target_os = "macos"))]
+ fn fill_terminal_user_token(&mut self, _username: &str, _password: &str) -> Option<&'static str> {
+ self.terminal_user_token = Some(TerminalUserToken::SelfUser);
+ None
+ }
+
// Try to fill user token for terminal connection.
// If username is empty, use the user token of the current session.
// If username is not empty, try to logon and check if the user is an administrator.