mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
virtual display, linux, debug
Signed-off-by: qcloud <ubuntu@localhost.localdomain>
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -111,6 +111,7 @@ impl DesktopManager {
|
||||
pub fn new() -> Self {
|
||||
let mut x11_username = "".to_owned();
|
||||
let seat0_values = get_values_of_seat0(&[0, 1, 2]);
|
||||
println!("REMOVE ME ======================== DesktopManager seato values {:?}", &seat0_values);
|
||||
if !seat0_values[0].is_empty() {
|
||||
if "x11" == get_display_server_of_session(&seat0_values[1]) {
|
||||
x11_username = seat0_values[2].clone();
|
||||
@@ -608,7 +609,7 @@ impl DesktopManager {
|
||||
//"-logfile",
|
||||
//"/tmp/RustDesk_xorg.log",
|
||||
"-config",
|
||||
"rustdesk/xorg.conf",
|
||||
"/etc/rustdesk/xorg.conf",
|
||||
"-auth",
|
||||
xauth,
|
||||
display,
|
||||
|
||||
Reference in New Issue
Block a user