virtual display, linux, debug
Signed-off-by: qcloud <ubuntu@localhost.localdomain>
This commit is contained in:
parent
6149c7f477
commit
b82207f20b
4 changed files with 31 additions and 69 deletions
|
|
@ -225,6 +225,13 @@ fn stop_rustdesk_servers() {
|
|||
));
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn stop_xorg_subprocess() {
|
||||
let _ = run_cmds(format!(
|
||||
r##"ps -ef | grep '/etc/rustdesk/xorg.conf' | grep -v grep | awk '{{printf("kill -9 %d\n", $2)}}' | bash"##,
|
||||
));
|
||||
}
|
||||
|
||||
fn should_start_server(
|
||||
try_x11: bool,
|
||||
uid: &mut String,
|
||||
|
|
@ -295,6 +302,7 @@ fn force_stop_server() {
|
|||
|
||||
pub fn start_os_service() {
|
||||
stop_rustdesk_servers();
|
||||
stop_xorg_subprocess();
|
||||
start_uinput_service();
|
||||
|
||||
let running = Arc::new(AtomicBool::new(true));
|
||||
|
|
@ -329,6 +337,7 @@ pub fn start_os_service() {
|
|||
&mut last_restart,
|
||||
&mut server,
|
||||
) {
|
||||
stop_xorg_subprocess();
|
||||
force_stop_server();
|
||||
start_server(None, &mut server);
|
||||
}
|
||||
|
|
@ -921,7 +930,6 @@ mod desktop {
|
|||
if !self.sid.is_empty() && is_active(&self.sid) {
|
||||
return;
|
||||
}
|
||||
|
||||
let seat0_values = get_values_of_seat0(&[0, 1, 2]);
|
||||
if seat0_values[0].is_empty() {
|
||||
*self = Self::default();
|
||||
|
|
@ -942,8 +950,6 @@ mod desktop {
|
|||
self.get_display();
|
||||
self.get_xauth();
|
||||
self.set_is_subprocess();
|
||||
|
||||
println!("REMOVE ME ======================================= desktop: {:?}", self);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue