Compare commits

...
Author SHA1 Message Date
github-actions[bot] 0f9d6c67ee chore: update webpki-roots to latest Mozilla root store 2026-10-26 03:25:11 +00:00
VenusGirl❤ 1297da6d18 Update Korean language (#16687)
Update ko.rs
2026-10-24 17:28:24 +08:00
Lukas 8814503e06 fix(linux): pick up pulsectl's default source fix for voice calls (#16685) 2026-10-24 15:32:24 +08:00
Lukas c8a4e0680c fix(linux): capture the default output's monitor for remote audio (#16681)
* fix(linux): capture the default output's monitor for remote audio

With no audio input chosen, the _pa service recorded the first source whose name contains "monitor". Sources are listed in creation order, so on a host with more than one output, such as onboard audio plus HDMI, a USB headset or a Bluetooth speaker, that monitor can belong to an output the desktop does not play to, and the controlling side hears silence. Ask the server for the default sink and record its monitor, keeping the first monitor as the fallback.

* fix(linux): log the lookups that fall back to the first monitor

* fix(linux): fall back to the first monitor when the default sink has no monitor name

* fix(linux): throttle the default monitor lookup warnings
2026-10-24 14:56:09 +08:00
Cody SwartzandClaude Opus 5.5 ed6a1acce8 feat(address-book): add a toolbar button to open the web console (#16680)
The web console is only reachable from the "More on web console" item
in the menu beside the Tags heading, which is easy to miss and hidden
when the tags panel is turned off.

Add a button to the Address Book toolbar that opens the same URL and
reuses the same tooltip text. It shows under the same conditions as the
menu item: logged in, not in legacy address book mode, and write access
to the current book.

Signed-off-by: Cody Swartz <ctsstc@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 10:41:57 +08:00
21pages 4d37f00af9 fix(client): invalidate auto FPS state when updating FPS limits (#16283)
* fix(client): sync FPS control and reset limits on quality changes

  Track the last sent FPS across manual and automatic updates.
  Reset the FPS limit to 30 when leaving custom image quality,
  while preserving lower automatic limits when already capped at 30.

 fix(client): reset last sent FPS state on reconnect

Signed-off-by: 21pages <sunboeasy@gmail.com>

fix(client): invalidate auto FPS state when updating FPS limits

  Clear last_auto_fps when setting custom FPS so the controller recomputes
  on its next tick. Restore the 30 FPS cap when switching to preset quality
  while preserving the saved custom FPS setting.

Signed-off-by: 21pages <sunboeasy@gmail.com>

fix(client): reset auto FPS state after successful login

  Move last_auto_fps invalidation from login send paths to
  handle_peer_info, covering both normal and switch-side logins.

Signed-off-by: 21pages <sunboeasy@gmail.com>

fix(client): scope auto FPS state to each connection

Keep automatic FPS state in the connection loop and invalidate it when processing manual FPS updates or successful login.

Validate queued automatic updates against the current FPS cap and record the value only after a successful send.

Signed-off-by: 21pages <sunboeasy@gmail.com>

* test(client): cover FPS adjustment after manual updates

Signed-off-by: 21pages <sunboeasy@gmail.com>

---------

Signed-off-by: 21pages <sunboeasy@gmail.com>
2026-10-23 19:13:39 +08:00
Lukas 21c488b6ce fix(linux): recognize a login screen whose greeter uses another nologin path (#16675)
* fix(linux): recognize a login screen whose greeter uses another nologin path

is_prelogin() reads the active user's passwd entry and treats /bin/false or /usr/sbin/nologin as a greeter account. Greeter accounts on Arch use /usr/bin/nologin (gdm, sddm and lightdm) and others /sbin/nologin, so there a login screen was not detected: the audio service kept retrying the _pa ipc every second, which #16390 stopped at a login screen, and file transfer used the greeter's name. Match any nologin path.

* fix(linux): match nologin only in the shell field of the passwd entry

Checking the whole getent line also matched a home directory such as /home/nologin-test. Read the last field of each line and require it to end in /false or /nologin. Output with several lines, as getent prints for an empty name, still counts if any entry has such a shell, as before.

* fix(linux): compare the greeter shell with the known paths only

Match the shell field against /bin/false, /usr/bin/false, /usr/sbin/nologin, /sbin/nologin and /usr/bin/nologin instead of any path that ends in /false or /nologin, so a custom shell elsewhere is not taken for a login screen.
2026-10-23 18:09:08 +08:00
Lukas 01e1323e51 fix(linux): keep listing resolutions after an interlaced xrandr mode (#16672)
* fix(linux): keep listing resolutions after an interlaced xrandr mode

resolutions() reads the mode lines below an output with (\s*\d+x\d+\s+\d+.*\n)+, which needs whitespace right after the size. A TV usually lists 1920x1080i right after 1920x1080, so the list ended there and the resolution menu offered only the current mode. Allow a suffix after the size; the per-mode pattern still skips the interlaced lines, so only the following progressive modes are added.

* test(linux): check the resolutions parsed from xrandr output

Move the parsing of resolutions() into resolutions_from_xrandr(), which takes the xrandr output, so the test asserts the returned list instead of the captured mode lines. resolutions() runs xrandr and calls it; the parsing is unchanged.

* Revert "test(linux): check the resolutions parsed from xrandr output"

This reverts commit 854beb1. AGENTS.md asks not to reshape existing code only to enable a test, so resolutions() keeps its structure and the test checks the captured mode lines, as output_name_does_not_match_inside_another_name checks get_xrandr_conn_pat.
2026-10-23 17:23:02 +08:00
Lukas 106f700be4 fix(linux): read Debian's GDM config when checking for a Wayland login screen (#16674)
is_login_wayland() looks for WaylandEnable in /etc/gdm3/custom.conf and /etc/gdm/custom.conf. Debian's gdm3 package ships /etc/gdm3/daemon.conf instead (bookworm and trixie), whose default has '#WaylandEnable=false', so on Debian the function always returned false and the 'Login screen using Wayland is not supported' card never appeared. Read daemon.conf after the two custom.conf paths.
2026-10-23 16:58:52 +08:00
Lukas f7b0af78cb fix(lang): pick Traditional Chinese for Hong Kong and Macao system locales (#16671)
* fix(lang): pick Traditional Chinese for Hong Kong and Macao system locales

With no language chosen in Settings, resolve_lang picks zh-tw only when the system locale contains tw. Hong Kong and Macao locales (zh_HK, zh-Hant-HK, zh_HK_#Hant, zh_MO) and a bare zh-Hant got Simplified Chinese, although they write Traditional Chinese. Pick zh-tw for them too, unless the locale names the Hans script.

* test(lang): cover a bare zh-Hant locale
2026-10-23 16:49:51 +08:00
Lukas 25d2742273 fix(lang): pick the Kazakh and Georgian translations from the system locale (#16670)
With no language chosen in Settings, resolve_lang takes the language from the system locale prefix. Kazakh locales are kk_* and Georgian locales are ka_*, but their translation tables are keyed kz and ge, so both fell through to English. Map kk to kz and ka to ge for the locale-derived language. A language saved in Settings is unchanged.
2026-10-23 15:56:15 +08:00
Hüseyin Durna eb6c32bd57 l10n(tr): fill missing shortcut and API server translations (#16669)
Signed-off-by: Hüseyin Durna <76519526+husodrn46@users.noreply.github.com>
2026-10-23 15:48:35 +08:00
Rafał Sikora 398364fa18 fix(ios): keep background music playing during remote sessions (#16660)
Configure the iOS audio session with the ambient category so remote
playback mixes with other apps while respecting Silent mode and lock.
Log configuration errors and leave audio activation to playback.

Signed-off-by: Rafal <mrsikorarafal@gmail.com>
2026-10-23 11:23:08 +08:00
rustdeskandClaude Opus 5.5 828d1101af chore(deps): pin hwcodec to rustdesk-org/hwcodec#47
Move the locked hwcodec revision from febec27 to ec38eba, the merge of
rustdesk-org/hwcodec#47: GPU query failure handling, Windows resource
handling and recoverable fragmented MP4 recording. hwcodec's own
dependencies are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 18:48:28 +08:00
RustDeskandClaude Opus 5.5 3ec041644d fix(linux): gtk sudo shows no false "Sorry, try again." and retries with sudo-rs (#16652)
* fix(linux): no false "Sorry, try again." in gtk sudo after a PAM info line

The gtk sudo dialog takes the password before sudo starts and drops it
when sudo prints a non-prompt line first, such as pam_fprintd's "Place
your finger on the fingerprint reader". The real password prompt then
came up labelled as a retry, "Sorry, try again.", although no password
had been sent, so users took it as a rejected password.

Treat the next prompt as a first prompt when the typed password is
dropped. The dialog comes back prefilled and without the error.

Keeping the password and sending it to the next prompt instead is not
safe: when sudo authenticates without a prompt (fingerprint, NOPASSWD),
use_pty, the default since sudo 1.9.14, holds the tty in raw mode while
the command runs, so any output line ending in ':' would receive it.

Fixes #16647

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(linux): let gtk sudo retry after sudo-rs rejects a password

sudo-rs reports a rejected password with "sudo: Authentication failed,
try again." and then asks again. The line starts with "sudo:", so
ui_parent treated it as fatal: it showed it in an error dialog and
exited instead of offering a retry, as it does after classic sudo's
"Sorry, try again." (the second log in #16647).

Exempt exactly that line from the fatal check. It then goes through
the ordinary non-prompt branch, so the held-password drop rule still
applies. sudo-rs's final "maximum N incorrect authentication attempts"
stays fatal, and so does every other sudo:/su: line.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 18:27:35 +08:00
RustDeskandClaude Opus 5.5 d97351ad73 Custom websocket port (#16658)
* feat: let custom client settings set websocket-port

A domain endpoint becomes ws(s)://<domain>/ws/id with no port, so a
WebSocket reverse proxy that cannot listen on 443 (or 80) is
unreachable. hbb_common adds websocket-port for that; list it in
KEYS_SETTINGS so default-settings and override-settings carry it.

The hbb_common bump also brings in 20d5019 (quiets smithay client
toolkit logs, rustdesk/hbb_common#620).

https://github.com/rustdesk/rustdesk-server-pro/discussions/1029

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Update hbb_common for the websocket-port warning throttle

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Update hbb_common: match websocket-port only against configured servers

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Pin hbb_common to the merged websocket-port change

rustdesk/hbb_common#626 is merged as edefa08. The range from master's
pin 5d52530 also includes 20d5019 (quiets smithay client toolkit logs,
rustdesk/hbb_common#620).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 17:58:00 +08:00
13 changed files with 298 additions and 89 deletions
Generated
+8 -8
View File
@@ -3737,7 +3737,7 @@ dependencies = [
"url",
"users",
"uuid",
"webpki-roots 1.0.10",
"webpki-roots 1.0.11",
"webrtc",
"whoami",
"x11 2.21.0",
@@ -3889,7 +3889,7 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4"
[[package]]
name = "hwcodec"
version = "0.8.0"
source = "git+https://github.com/rustdesk-org/hwcodec#febec27e1b40bb9fbbae02e9c59b71ac824b9fe1"
source = "git+https://github.com/rustdesk-org/hwcodec#ec38ebaf2454269d4c5668a57e3813c6e5541be7"
dependencies = [
"bindgen 0.59.2",
"cc",
@@ -3935,7 +3935,7 @@ dependencies = [
"tokio",
"tokio-rustls",
"tower-service",
"webpki-roots 1.0.10",
"webpki-roots 1.0.11",
]
[[package]]
@@ -6930,7 +6930,7 @@ dependencies = [
"wasm-bindgen",
"wasm-bindgen-futures",
"web-sys",
"webpki-roots 1.0.10",
"webpki-roots 1.0.11",
]
[[package]]
@@ -7041,7 +7041,7 @@ dependencies = [
[[package]]
name = "rust-pulsectl"
version = "0.2.12"
source = "git+https://github.com/rustdesk-org/pulsectl#aa34dde499aa912a3abc5289cc0b547bd07dd6e2"
source = "git+https://github.com/rustdesk-org/pulsectl#d2ec086b5770dce934a66956364d09df8cc9484c"
dependencies = [
"libpulse-binding",
]
@@ -9553,14 +9553,14 @@ version = "0.26.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "521bc38abb08001b01866da9f51eb7c5d647a19260e00054a8c7fd5f9e57f7a9"
dependencies = [
"webpki-roots 1.0.10",
"webpki-roots 1.0.11",
]
[[package]]
name = "webpki-roots"
version = "1.0.10"
version = "1.0.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1c1c8e20c8a38fc7d65abfe74eb7280e4aa667e8eec8bc84996d2874810748d9"
checksum = "f5f280bbb2b287bc8e7de7e3852945a0ff50d1bbcb5ed42b6c7a568c546df171"
dependencies = [
"rustls-pki-types",
]
+7
View File
@@ -1,5 +1,6 @@
import UIKit
import Flutter
import AVFoundation
@main
@objc class AppDelegate: FlutterAppDelegate {
@@ -8,6 +9,12 @@ import Flutter
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
GeneratedPluginRegistrant.register(with: self)
do {
// Mix remote audio with other apps while still respecting silent mode.
try AVAudioSession.sharedInstance().setCategory(.ambient)
} catch {
NSLog("Failed to configure audio mixing: %@", error.localizedDescription)
}
dummyMethodToEnforceBundling();
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
@@ -21,6 +21,7 @@ import 'package:flutter_svg/flutter_svg.dart';
import 'package:get/get.dart';
import 'package:provider/provider.dart';
import 'package:pull_down_button/pull_down_button.dart';
import 'package:url_launcher/url_launcher_string.dart';
import '../../common.dart';
import '../../models/platform_model.dart';
@@ -549,6 +550,28 @@ class _PeerTabPageState extends State<PeerTabPage>
});
}
Widget _openWebConsole() {
return _hoverAction(
context: context,
toolTip: translate('ab_web_console_tip'),
child: Icon(
Icons.open_in_new,
size: 18,
),
onTap: () async {
final url = await bind.mainGetApiServer();
if (await canLaunchUrlString(url)) {
launchUrlString(url);
}
});
}
bool _showWebConsole(PeerTabModel model) =>
model.currentTab == PeerTabIndex.ab.index &&
gFFI.userModel.isLogin &&
!gFFI.abModel.legacyMode.value &&
gFFI.abModel.current.canWrite();
List<Widget> _landscapeRightActions(BuildContext context) {
final model = Provider.of<PeerTabModel>(context);
return [
@@ -566,6 +589,10 @@ class _PeerTabPageState extends State<PeerTabPage>
offstage: model.currentTab == PeerTabIndex.recent.index,
child: PeerSortDropdown(),
),
Offstage(
offstage: !_showWebConsole(model),
child: _openWebConsole(),
),
Offstage(
offstage: model.currentTab != PeerTabIndex.ab.index,
child: _toggleTags(),
@@ -630,6 +657,7 @@ class _PeerTabPageState extends State<PeerTabPage>
final List<Widget> dynamicActions = [
if (model.currentTabCachedPeers.isNotEmpty) _createMultiSelection(),
if (model.currentTab != PeerTabIndex.recent.index) PeerSortDropdown(),
if (_showWebConsole(model)) _openWebConsole(),
if (model.currentTab == PeerTabIndex.ab.index) _toggleTags()
];
final rightWidth = availableWidth -
+1
View File
@@ -311,6 +311,7 @@ pub const KEYS_SETTINGS: &[&str] = &[
OPTION_API_SERVER,
OPTION_KEY,
OPTION_ALLOW_WEBSOCKET,
OPTION_WEBSOCKET_PORT,
OPTION_PRESET_ADDRESS_BOOK_NAME,
OPTION_PRESET_ADDRESS_BOOK_TAG,
OPTION_PRESET_ADDRESS_BOOK_ALIAS,
-1
View File
@@ -2872,7 +2872,6 @@ pub struct LoginConfigHandler {
pub save_ab_password_to_recent: bool, // true: connected with ab password
pub other_server: Option<(String, String, String)>,
pub custom_fps: Arc<Mutex<Option<usize>>>,
pub last_auto_fps: Option<usize>,
pub adapter_luid: Option<i64>,
pub mark_unsupported: Vec<CodecFormat>,
pub selected_windows_session_id: Option<u32>,
+57 -5
View File
@@ -98,6 +98,7 @@ pub struct Remote<T: InvokeUiSession> {
elevation_requested: bool,
peer_info: ParsedPeerInfo,
video_threads: HashMap<usize, VideoThread>,
last_auto_fps: Option<usize>,
chroma: Arc<RwLock<Option<Chroma>>>,
last_record_state: bool,
sent_close_reason: bool,
@@ -150,6 +151,7 @@ impl<T: InvokeUiSession> Remote<T> {
elevation_requested: false,
peer_info: Default::default(),
video_threads: Default::default(),
last_auto_fps: None,
chroma: Default::default(),
last_record_state: false,
sent_close_reason: false,
@@ -382,7 +384,7 @@ impl<T: InvokeUiSession> Remote<T> {
self.video_threads.iter().for_each(|(_, v)| {
*v.frame_count.write().unwrap() = 0;
});
self.fps_control(direct, fps.clone());
self.fps_control(direct, fps.clone(), &mut peer).await;
let chroma = self.chroma.read().unwrap().clone();
let chroma = match chroma {
Some(Chroma::I444) => "4:4:4",
@@ -787,6 +789,11 @@ impl<T: InvokeUiSession> Remote<T> {
self.initial_clipboard_pending = false;
}
Some(message::Union::Misc(misc)) => match misc.union {
Some(misc::Union::Option(ref option)) => {
if option.custom_fps > 0 {
self.last_auto_fps = None;
}
}
Some(misc::Union::RefreshVideo(_)) => {
self.video_threads.iter().for_each(|(_, v)| {
*v.discard_queue.write().unwrap() = true;
@@ -1386,7 +1393,12 @@ impl<T: InvokeUiSession> Remote<T> {
// Currently, this function only considers decoding speed and queue length, not network delay.
// The controlled end can consider auto fps as the maximum decoding fps.
#[inline]
fn fps_control(&mut self, direct: bool, real_fps_map: HashMap<usize, i32>) {
async fn fps_control(
&mut self,
direct: bool,
real_fps_map: HashMap<usize, i32>,
peer: &mut Stream,
) {
self.video_threads.iter_mut().for_each(|(k, v)| {
let real_fps = real_fps_map.get(k).cloned().unwrap_or_default();
if real_fps == 0 {
@@ -1426,7 +1438,7 @@ impl<T: InvokeUiSession> Remote<T> {
if limited_fps > custom_fps {
limited_fps = custom_fps;
}
let last_auto_fps = self.handler.lc.read().unwrap().last_auto_fps.clone();
let last_auto_fps = self.last_auto_fps;
let displays = self.video_threads.keys().cloned().collect::<Vec<_>>();
let mut fps_trending = |display: usize| {
let thread = self.video_threads.get_mut(&display)?;
@@ -1472,9 +1484,10 @@ impl<T: InvokeUiSession> Remote<T> {
});
let mut msg = Message::new();
msg.set_misc(misc);
self.sender.send(Data::Message(msg)).ok();
// Send inline so a queued manual FPS update is applied after this decision.
allow_err!(peer.send(&msg).await);
log::info!("Set fps to {}", auto_fps);
self.handler.lc.write().unwrap().last_auto_fps = Some(auto_fps);
self.last_auto_fps = Some(auto_fps);
}
}
// send refresh
@@ -2387,6 +2400,7 @@ impl<T: InvokeUiSession> Remote<T> {
}
fn set_peer_info(&mut self, pi: &PeerInfo) {
self.last_auto_fps = None;
self.peer_info.platform = pi.platform.clone();
// Check features field for terminal support
@@ -3019,6 +3033,44 @@ mod tests {
"a clipboard after the login was held back"
);
}
#[tokio::test]
async fn manual_fps_update_allows_the_same_automatic_limit_again() {
let (mut remote, mut peer, mut far) = remote_and_peer().await;
let (video_sender, _video_receiver) = std::sync::mpsc::channel();
remote.video_threads.insert(
0,
VideoThread {
video_queue: Arc::new(RwLock::new(ArrayQueue::new(client::VIDEO_QUEUE_SIZE))),
video_sender,
decode_fps: Arc::new(RwLock::new(Some(23))),
frame_count: Default::default(),
discard_queue: Default::default(),
fps_control: Default::default(),
},
);
for (manual_fps, expected) in [(None, 20), (Some(90), 90), (None, 20)] {
if let Some(fps) = manual_fps {
let lc = &remote.handler.lc;
let msg = lc.write().unwrap().set_custom_fps(fps, false);
remote
.handle_msg_from_ui(Data::Message(msg), &mut peer)
.await;
} else {
remote
.fps_control(true, HashMap::from([(0, 20)]), &mut peer)
.await;
}
let bytes = timeout(1000, far.next())
.await
.expect("FPS update was not sent")
.unwrap()
.unwrap();
let msg = Message::parse_from_bytes(&bytes).unwrap();
assert_eq!(msg.misc().option().custom_fps, expected);
}
}
}
#[cfg(test)]
+31
View File
@@ -143,6 +143,10 @@ fn resolve_lang(saved_lang: &str, locale: &str, cjk_fallback: bool) -> String {
"zh-cn"
})
.to_owned();
// Hong Kong, Macao and the Hant script use Traditional Chinese.
if !locale.contains("hans") && ["hk", "mo", "hant"].iter().any(|x| locale.contains(x)) {
lang = "zh-tw".to_owned();
}
}
}
if lang.is_empty() {
@@ -167,6 +171,12 @@ fn resolve_lang(saved_lang: &str, locale: &str, cjk_fallback: bool) -> String {
.map(|x| x.split("_").next().unwrap_or_default())
.unwrap_or_default()
.to_owned();
// The Kazakh and Georgian tables are keyed by country code, not by language code.
if lang == "kk" {
lang = "kz".to_owned();
} else if lang == "ka" {
lang = "ge".to_owned();
}
}
if cjk_fallback && is_cjk_lang(&lang) {
"en".to_owned()
@@ -365,4 +375,25 @@ mod test {
assert_eq!(f("", "pt-AO", false), "pt-pt");
assert_eq!(f("", "pt-MZ", false), "pt-pt");
}
#[test]
fn test_resolve_lang_detects_kazakh_and_georgian_from_locale() {
use super::resolve_lang as f;
assert_eq!(f("", "kk_KZ.UTF-8", false), "kz");
assert_eq!(f("", "kk-KZ", false), "kz");
assert_eq!(f("", "ka_GE.UTF-8", false), "ge");
assert_eq!(f("", "ka-GE", false), "ge");
}
#[test]
fn test_resolve_lang_detects_traditional_chinese_for_hong_kong_and_macao() {
use super::resolve_lang as f;
assert_eq!(f("", "zh_HK.UTF-8", false), "zh-tw");
assert_eq!(f("", "zh-Hant-HK", false), "zh-tw");
assert_eq!(f("", "zh-Hant", false), "zh-tw");
assert_eq!(f("", "zh_MO", false), "zh-tw");
assert_eq!(f("", "zh-Hans-HK", false), "zh-cn");
}
}
+34 -34
View File
@@ -781,39 +781,39 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Relay fallback delay in seconds", "릴레이 대체 작동 지연 시간 (초)"),
("relay-fallback-delay-tip", "이미 연결된 중계 연결이 직접 WebRTC 연결을 얼마나 기다린 후 대신 사용되는지입니다. 값을 늘리면 느린 직접 연결에 더 많은 시간을 주고, 줄이면 직접 연결이 불가능한 네트워크에서 더 빨리 중계로 전환합니다. 비워 두면 기본값 2.5초가 사용됩니다."),
("To start a voice call, enable \"Audio capture\" on the \"Share screen\" page.", "음성 통화를 시작하려면 '화면 공유' 페이지에서 '오디오 캡처'를 사용함으로 하세요."),
("Keyboard shortcuts", ""),
("Configure shortcuts...", ""),
("Enable keyboard shortcuts in remote session", ""),
("shortcut-page-description", ""),
("shortcut-passthrough-tip", ""),
("Pass-through to remote", ""),
("Reset to defaults", ""),
("shortcut-reset-confirm-tip", ""),
("Monitor", ""),
("Keyboard", ""),
("Toggle fullscreen", ""),
("Switch to next display", ""),
("Switch to previous display", ""),
("Switch to next tab", ""),
("Switch to previous tab", ""),
("Toggle session recording", ""),
("Close tab", ""),
("Toggle toolbar", ""),
("Toggle input source", ""),
("Edit", ""),
("Save", ""),
("Set shortcut", ""),
("shortcut-recording-instruction", ""),
("shortcut-recording-press-keys-tip", ""),
("shortcut-must-include-modifiers", ""),
("shortcut-already-bound-to", ""),
("Replace", ""),
("Valid", ""),
("shortcut-mobile-physical-keyboard-tip", ""),
("shortcut-key-not-supported", ""),
("On", ""),
("Off", ""),
("api_server_connection_tip", ""),
("api_server_empty_tip", ""),
("Keyboard shortcuts", "키보드 단축키"),
("Configure shortcuts...", "단축키 구성"),
("Enable keyboard shortcuts in remote session", "원격 세션에서 키보드 단축키 사용함"),
("shortcut-page-description", "아래 각 세션 동작에 키 조합을 할당하세요. 각 연결에는 최소 하나의 수정자가 포함되어야 합니다."),
("shortcut-passthrough-tip", "활성화되면 모든 할당 조합이 원격으로 전달됩니다. 연결이 원격에서 필요한 항목과 충돌할 때 유용합니다."),
("Pass-through to remote", "원격으로 전달"),
("Reset to defaults", "기본값으로 재설정"),
("shortcut-reset-confirm-tip", "현재의 모든 할당을 기본값으로 대체합니다. 계속하시겠습니까?"),
("Monitor", "모니터"),
("Keyboard", "키보드"),
("Toggle fullscreen", "전체 화면 전환"),
("Switch to next display", "다음 디스플레이로 전환"),
("Switch to previous display", "이전 디스플레이로 전환"),
("Switch to next tab", "다음 탭으로 전환"),
("Switch to previous tab", "이전 탭으로 전환"),
("Toggle session recording", "녹화 세션 전환"),
("Close tab", "탭 닫기"),
("Toggle toolbar", "도구 모음 전환"),
("Toggle input source", "입력 소스 전환"),
("Edit", "편집"),
("Save", "저장"),
("Set shortcut", "단축키 설정"),
("shortcut-recording-instruction", "사용할 키 조합을 누르세요."),
("shortcut-recording-press-keys-tip", "키 조합을 누르세요.."),
("shortcut-must-include-modifiers", "수정자 하나 이상을 반드시 포함해야 합니다: {}"),
("shortcut-already-bound-to", "이미 할당됨"),
("Replace", "교체"),
("Valid", "유효"),
("shortcut-mobile-physical-keyboard-tip", "녹화하려면 물리적 키보드가 필요합니다. 소프트 키보드는 지원되지 않습니다."),
("shortcut-key-not-supported", "\"{}\"는 단축키로 사용할 수 없습니다."),
("On", "켬"),
("Off", "끔"),
("api_server_connection_tip", "사용 중인 맞춤형 서버가 암호화되지 않은 HTTP를 사용합니다. HTTPS를 사용하도록 관리자에게 문의하세요."),
("api_server_empty_tip", "API 서버가 비어 있으면 사용자 지정 서버는 기본적으로 HTTP로 설정됩니다. HTTPS를 사용하도록 관리자에게 문의하세요."),
].iter().cloned().collect();
}
+34 -34
View File
@@ -781,39 +781,39 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Relay fallback delay in seconds", "Aktarıcıya geçiş gecikmesi (saniye)"),
("relay-fallback-delay-tip", "Zaten kurulmuş bir aktarıcı bağlantısının, onun yerine kullanılmadan önce doğrudan WebRTC bağlantısını ne kadar beklediğidir. Yavaş bir doğrudan bağlantıya daha fazla süre tanımak için artırın; doğrudan bağlantının kurulamadığı ağlarda aktarıcıya daha erken geçmek için azaltın. Varsayılan 2.5 saniye için boş bırakın."),
("To start a voice call, enable \"Audio capture\" on the \"Share screen\" page.", "Sesli arama başlatmak için \"Ekranı Paylaş\" sayfasındaki \"Ses yakalama\" seçeneğini açın."),
("Keyboard shortcuts", ""),
("Configure shortcuts...", ""),
("Enable keyboard shortcuts in remote session", ""),
("shortcut-page-description", ""),
("shortcut-passthrough-tip", ""),
("Pass-through to remote", ""),
("Reset to defaults", ""),
("shortcut-reset-confirm-tip", ""),
("Monitor", ""),
("Keyboard", ""),
("Toggle fullscreen", ""),
("Switch to next display", ""),
("Switch to previous display", ""),
("Switch to next tab", ""),
("Switch to previous tab", ""),
("Toggle session recording", ""),
("Close tab", ""),
("Toggle toolbar", ""),
("Toggle input source", ""),
("Edit", ""),
("Save", ""),
("Set shortcut", ""),
("shortcut-recording-instruction", ""),
("shortcut-recording-press-keys-tip", ""),
("shortcut-must-include-modifiers", ""),
("shortcut-already-bound-to", ""),
("Replace", ""),
("Valid", ""),
("shortcut-mobile-physical-keyboard-tip", ""),
("shortcut-key-not-supported", ""),
("On", ""),
("Off", ""),
("api_server_connection_tip", ""),
("api_server_empty_tip", ""),
("Keyboard shortcuts", "Klavye kısayolları"),
("Configure shortcuts...", "Kısayolları yapılandır..."),
("Enable keyboard shortcuts in remote session", "Uzak oturumda klavye kısayollarını etkinleştir"),
("shortcut-page-description", "Aşağıdaki her oturum eylemine bir tuş birleşimi atayın. Her birleşim en az bir değiştirici tuş içermelidir."),
("shortcut-passthrough-tip", "Açıkken, atanan tüm tuş birleşimleri uzak cihaza iletilir. Bir kısayol uzak cihazda kullanmanız gereken bir işlevle çakıştığında yararlıdır."),
("Pass-through to remote", "Tuş birleşimlerini uzak cihaza ilet"),
("Reset to defaults", "Varsayılanlara sıfırla"),
("shortcut-reset-confirm-tip", "Mevcut tüm kısayol atamaları varsayılan atamalarla değiştirilecek. Devam edilsin mi?"),
("Monitor", "Ekran"),
("Keyboard", "Klavye"),
("Toggle fullscreen", "Tam ekran modunu aç/kapat"),
("Switch to next display", "Sonraki ekrana geç"),
("Switch to previous display", "Önceki ekrana geç"),
("Switch to next tab", "Sonraki sekmeye geç"),
("Switch to previous tab", "Önceki sekmeye geç"),
("Toggle session recording", "Oturum kaydını başlat/durdur"),
("Close tab", "Sekmeyi kapat"),
("Toggle toolbar", "Araç çubuğunu göster/gizle"),
("Toggle input source", "Giriş kaynağını değiştir"),
("Edit", "Düzenle"),
("Save", "Kaydet"),
("Set shortcut", "Kısayol ata"),
("shortcut-recording-instruction", "Kullanmak istediğiniz tuş birleşimine basın."),
("shortcut-recording-press-keys-tip", "Bir tuş birleşimine basın..."),
("shortcut-must-include-modifiers", "En az bir değiştirici tuş içermelidir: {}"),
("shortcut-already-bound-to", "Zaten atandığı eylem:"),
("Replace", "Değiştir"),
("Valid", "Geçerli"),
("shortcut-mobile-physical-keyboard-tip", "Kısayol kaydetmek için fiziksel klavye gerekir. Sanal klavyeler desteklenmez."),
("shortcut-key-not-supported", "\"{}\" kısayol olarak kullanılamaz."),
("On", "Açık"),
("Off", "Kapalı"),
("api_server_connection_tip", "Özel sunucunuz şifrelenmemiş HTTP kullanıyor. HTTPS'yi etkinleştirmesi için yöneticinize başvurun."),
("api_server_empty_tip", "API sunucusu alanı boş bırakıldığında özel sunucunuz varsayılan olarak HTTP kullanır. HTTPS'yi etkinleştirmesi için yöneticinize başvurun."),
].iter().cloned().collect();
}
+5 -1
View File
@@ -351,7 +351,10 @@ fn ui_parent(
let last_line = buf.lines().last().unwrap_or(&buf).trim().to_string();
log::info!("read from child: {}", buf);
if last_line.starts_with("sudo:") || last_line.starts_with("su:") {
// sudo-rs's notice for a rejected password, not an error: it asks again.
if (last_line.starts_with("sudo:") || last_line.starts_with("su:"))
&& last_line != "sudo: Authentication failed, try again."
{
if let Err(e) = tx_to_ui.send(Message::ErrorDialog(last_line)) {
log::error!("Channel error: {e:?}");
kill_child(child);
@@ -419,6 +422,7 @@ fn ui_parent(
if !last_line.is_empty() && initial_password.is_some() {
log::error!("received not empty line: {last_line}, clear initial password");
initial_password = None;
first = true;
}
}
}
+90 -3
View File
@@ -1322,7 +1322,12 @@ fn get_cm() -> bool {
}
pub fn is_login_wayland() -> bool {
let files = ["/etc/gdm3/custom.conf", "/etc/gdm/custom.conf"];
// Debian's gdm3 reads /etc/gdm3/daemon.conf instead of custom.conf.
let files = [
"/etc/gdm3/custom.conf",
"/etc/gdm/custom.conf",
"/etc/gdm3/daemon.conf",
];
match (
Regex::new(r"# *WaylandEnable *= *false"),
Regex::new(r"WaylandEnable *= *true"),
@@ -1419,7 +1424,17 @@ pub fn is_prelogin() -> bool {
}
let name = get_active_username();
if let Ok(res) = run_cmds(&format!("getent passwd {}", name)) {
return res.contains("/bin/false") || res.contains("/usr/sbin/nologin");
return res.lines().any(|entry| {
let shell = entry.trim().rsplit(':').next().unwrap_or_default();
matches!(
shell,
"/bin/false"
| "/usr/bin/false"
| "/usr/sbin/nologin"
| "/sbin/nologin"
| "/usr/bin/nologin"
)
});
}
false
}
@@ -1535,6 +1550,9 @@ where
}
pub fn get_pa_monitor() -> String {
if let Some(monitor) = get_default_pa_monitor() {
return monitor;
}
get_pa_sources()
.drain(..)
.map(|x| x.0)
@@ -1543,6 +1561,49 @@ pub fn get_pa_monitor() -> String {
.unwrap_or("".to_owned())
}
// The first monitor in the source list can belong to an output the desktop does not play to.
fn get_default_pa_monitor() -> Option<String> {
use pulsectl::controllers::*;
// The audio service retries about every second while PulseAudio is unavailable.
const LOG_INTERVAL: std::time::Duration = std::time::Duration::from_secs(60);
let mut handler = SinkController::create()
.map_err(|err| {
hbb_common::throttled_log!(
LOG_INTERVAL,
warn,
"Failed to create SinkController: {:?}",
err
)
})
.ok()?;
let sink = handler
.get_server_info()
.map_err(|err| {
hbb_common::throttled_log!(
LOG_INTERVAL,
warn,
"Failed to get the PulseAudio server info: {:?}",
err
)
})
.ok()?
.default_sink_name?;
handler
.get_device_by_name(&sink)
.map_err(|err| {
hbb_common::throttled_log!(
LOG_INTERVAL,
warn,
"Failed to get the default sink {}: {:?}",
sink,
err
)
})
.ok()?
.monitor_name
.filter(|name| !name.is_empty())
}
pub fn get_pa_source_name(desc: &str) -> String {
get_pa_sources()
.drain(..)
@@ -1940,8 +2001,12 @@ fn get_xrandr_conn_pat(name: &str) -> String {
)
}
// The mode lines below an output. A mode name can have a suffix after its size, like the "i" of
// "1920x1080i", so a TV's interlaced mode does not end the list.
const XRANDR_MODES_PAT: &str = r"(?P<resolutions>(\s*\d+x\d+\S*\s+\d+.*\n)+)";
pub fn resolutions(name: &str) -> Vec<Resolution> {
let resolutions_pat = r"(?P<resolutions>(\s*\d+x\d+\s+\d+.*\n)+)";
let resolutions_pat = XRANDR_MODES_PAT;
let connected_pat = get_xrandr_conn_pat(name);
let mut v = vec![];
if let Ok(re) = Regex::new(&format!("{}{}", connected_pat, resolutions_pat)) {
@@ -2035,6 +2100,28 @@ DP-1 connected 2560x1440+1920+0 (normal left inverted right x axis y axis) 597mm
let caps = re.captures(xrandr_output).unwrap();
assert_eq!(get_width_height_from_captures(&caps), Some((2560, 1440)));
}
#[test]
fn interlaced_mode_does_not_end_the_mode_list() {
let xrandr_output =
"Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 16384 x 16384
HDMI-0 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 1600mm x 900mm
1920x1080 60.00*+ 59.94 50.00
1920x1080i 60.00 59.94 50.00
1280x720 60.00 59.94 50.00
640x480 75.00 59.94
DP-0 disconnected (normal left inverted right x axis y axis)
";
let re = Regex::new(&format!(
"{}{}",
get_xrandr_conn_pat("HDMI-0"),
XRANDR_MODES_PAT
))
.unwrap();
let caps = re.captures(xrandr_output).unwrap();
assert!(caps["resolutions"].contains(" 1280x720 "));
assert!(caps["resolutions"].contains(" 640x480 "));
}
}
pub fn change_resolution_directly(name: &str, width: usize, height: usize) -> ResultType<()> {
+2 -2
View File
@@ -497,8 +497,8 @@ impl<T: InvokeUiSession> Session<T> {
self.send(Data::Message(msg));
}
if value != "custom" {
let last_auto_fps = self.lc.read().unwrap().last_auto_fps;
if last_auto_fps.unwrap_or(usize::MAX) >= 30 {
let custom_fps = *self.lc.read().unwrap().custom_fps.lock().unwrap();
if custom_fps.unwrap_or(30) != 30 {
// non custom quality use 30 fps
let msg = self.lc.write().unwrap().set_custom_fps(30, false);
self.send(Data::Message(msg));