try sleep 3 for fixing tray exit not works because of pkexec in linux
This commit is contained in:
parent
0883864d39
commit
e47d921ac6
@ -180,11 +180,14 @@ pub fn core_main() -> Option<Vec<String>> {
|
|||||||
#[cfg(any(target_os = "linux", target_os = "windows"))]
|
#[cfg(any(target_os = "linux", target_os = "windows"))]
|
||||||
{
|
{
|
||||||
#[cfg(target_os = "linux")]
|
#[cfg(target_os = "linux")]
|
||||||
if crate::platform::is_root() {
|
std::thread::spawn(move || {
|
||||||
hbb_common::allow_err!(crate::platform::run_as_user(vec!["--tray"], None));
|
std::thread::sleep(std::time::Duration::from_secs(3));
|
||||||
} else {
|
if crate::platform::is_root() {
|
||||||
hbb_common::allow_err!(crate::run_me(vec!["--tray"]));
|
hbb_common::allow_err!(crate::platform::run_as_user(vec!["--tray"], None));
|
||||||
}
|
} else {
|
||||||
|
hbb_common::allow_err!(crate::run_me(vec!["--tray"]));
|
||||||
|
}
|
||||||
|
});
|
||||||
crate::start_server(true);
|
crate::start_server(true);
|
||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user