fix build

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou
2023-03-31 17:49:35 +08:00
parent ee3ac31083
commit 571c1df5c4
4 changed files with 6 additions and 17 deletions

View File

@@ -226,11 +226,11 @@ fn stop_rustdesk_servers() {
}
#[inline]
fn stop_xorg_subprocess() {
fn stop_subprocess() {
let _ = run_cmds(&format!(
r##"ps -ef | grep '/etc/rustdesk/xorg.conf' | grep -v grep | awk '{{printf("kill -9 %d\n", $2)}}' | bash"##,
));
let _ = run_cmds(format!(
let _ = run_cmds(&format!(
r##"ps -ef | grep -E 'rustdesk +--cm-no-ui' | grep -v grep | awk '{{printf("kill -9 %d\n", $2)}}' | bash"##,
));
}
@@ -797,16 +797,6 @@ mod desktop {
super::is_gdm_user(&self.username) && self.protocal == DISPLAY_SERVER_WAYLAND
}
#[inline]
pub fn is_headless(&self) -> bool {
self.sid.is_empty()
}
#[inline]
pub fn is_login_wayland(&self) -> bool {
super::is_gdm_user(&self.username) && self.protocal == DISPLAY_SERVER_WAYLAND
}
#[inline]
pub fn is_headless(&self) -> bool {
self.sid.is_empty() || self.is_rustdesk_subprocess

View File

@@ -373,7 +373,7 @@ impl DesktopManager {
fn wait_x_server_running(pid: u32, display_num: u32, max_wait_secs: u64) -> ResultType<()> {
let wait_begin = Instant::now();
loop {
if run_cmds(format!("ls /proc/{}", pid))?.is_empty() {
if run_cmds(&format!("ls /proc/{}", pid))?.is_empty() {
bail!("X server exit");
}