remove linux tray, since pkexec can not work under run_as env
This commit is contained in:
parent
53431eb162
commit
330bc03768
@ -172,15 +172,6 @@ pub fn core_main() -> Option<Vec<String>> {
|
|||||||
log::info!("start --server with user {}", crate::username());
|
log::info!("start --server with user {}", crate::username());
|
||||||
#[cfg(any(target_os = "linux", target_os = "windows"))]
|
#[cfg(any(target_os = "linux", target_os = "windows"))]
|
||||||
{
|
{
|
||||||
#[cfg(target_os = "linux")]
|
|
||||||
std::thread::spawn(move || {
|
|
||||||
std::thread::sleep(std::time::Duration::from_secs(3));
|
|
||||||
if crate::platform::is_root() {
|
|
||||||
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;
|
||||||
}
|
}
|
||||||
|
@ -284,7 +284,6 @@ pub fn set_option(key: String, value: String) {
|
|||||||
if value == "Y" {
|
if value == "Y" {
|
||||||
if crate::platform::uninstall_service(true) {
|
if crate::platform::uninstall_service(true) {
|
||||||
std::process::exit(0);
|
std::process::exit(0);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if crate::platform::install_service() {
|
if crate::platform::install_service() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user