mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-03-31 09:01:04 +03:00
replace pkexec with gtk sudo (#9383)
* Fix https://github.com/rustdesk/rustdesk/issues/9286, replace pkexec with gtk sudo. Tested on gnome (ubuntu 22.04, debian 13), xfce (manjaro, suse), kde (kubuntu 23), lxqt (lubuntu 22), Cinnamon (mint 21.3), Mate (mint 21.2) * Fix incorrect config of the main window opened by the tray, replace xdg-open with run_me, replace with dbus + run_me * Fix `check_if_stop_service`, it causes the problem fixed in https://github.com/rustdesk/rustdesk/pull/8414, now revert that fix and fix itself. Signed-off-by: 21pages <sunboeasy@gmail.com>
This commit is contained in:
@@ -98,12 +98,11 @@ fn make_tray() -> hbb_common::ResultType<()> {
|
||||
crate::run_me::<&str>(vec![]).ok();
|
||||
}
|
||||
#[cfg(target_os = "linux")]
|
||||
if !std::process::Command::new("xdg-open")
|
||||
.arg(&crate::get_uri_prefix())
|
||||
.spawn()
|
||||
.is_ok()
|
||||
{
|
||||
crate::run_me::<&str>(vec![]).ok();
|
||||
// Do not use "xdg-open", it won't read config
|
||||
if crate::dbus::invoke_new_connection(crate::get_uri_prefix()).is_err() {
|
||||
crate::run_me::<&str>(vec![]).ok();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user