cm-no-ui, debug
Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
parent
6238098cd0
commit
f91514e164
@ -143,18 +143,15 @@ impl DesktopManager {
|
||||
}
|
||||
|
||||
fn get_supported_display_seat0_username(&self) -> Option<String> {
|
||||
if is_gdm_user(&self.seat0_username)
|
||||
&& self.seat0_display_server == DISPLAY_SERVER_WAYLAND
|
||||
if is_gdm_user(&self.seat0_username) && self.seat0_display_server == DISPLAY_SERVER_WAYLAND
|
||||
{
|
||||
None
|
||||
} else {
|
||||
if self.seat0_username.is_empty() {
|
||||
} else if self.seat0_username.is_empty() {
|
||||
None
|
||||
} else {
|
||||
Some(self.seat0_username.clone())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn get_xauth() -> String {
|
||||
|
@ -2217,13 +2217,9 @@ async fn start_ipc(
|
||||
if !username.is_empty() {
|
||||
break;
|
||||
}
|
||||
let _res = timeout(500, _rx_desktop_ready.recv()).await;
|
||||
let _res = timeout(1_000, _rx_desktop_ready.recv()).await;
|
||||
username = linux_desktop_manager::get_username();
|
||||
}
|
||||
println!(
|
||||
"REMOVE ME =================================== headless username '{}' ",
|
||||
&username
|
||||
);
|
||||
let uid = {
|
||||
let output = run_cmds(format!("id -u {}", &username))?;
|
||||
let output = output.trim();
|
||||
@ -2232,11 +2228,7 @@ async fn start_ipc(
|
||||
}
|
||||
output.to_string()
|
||||
};
|
||||
user = Some((username, uid));
|
||||
println!(
|
||||
"REMOVE ME =================================== headless user '{:?}' ",
|
||||
&user
|
||||
);
|
||||
user = Some((uid, username));
|
||||
args = vec!["--cm-no-ui"];
|
||||
}
|
||||
let run_done;
|
||||
@ -2251,10 +2243,6 @@ async fn start_ipc(
|
||||
#[cfg(target_os = "linux")]
|
||||
{
|
||||
log::debug!("Start cm");
|
||||
println!(
|
||||
"REMOVE ME =================================== start_ipc 222 '{}' ",
|
||||
linux_desktop_manager::is_headless()
|
||||
);
|
||||
res = crate::platform::run_as_user(args.clone(), user.clone());
|
||||
}
|
||||
if res.is_ok() {
|
||||
@ -2269,10 +2257,6 @@ async fn start_ipc(
|
||||
} else {
|
||||
run_done = false;
|
||||
}
|
||||
println!(
|
||||
"REMOVE ME =================================== start_ipc 333 '{}' ",
|
||||
run_done
|
||||
);
|
||||
if !run_done {
|
||||
log::debug!("Start cm");
|
||||
super::CHILD_PROCESS
|
||||
|
@ -450,8 +450,6 @@ fn run(sp: GenericService) -> ResultType<()> {
|
||||
#[cfg(windows)]
|
||||
ensure_close_virtual_device()?;
|
||||
|
||||
println!("REMOVE ME ================================= run 111");
|
||||
|
||||
// ensure_inited() is needed because release_resource() may be called.
|
||||
#[cfg(target_os = "linux")]
|
||||
super::wayland::ensure_inited()?;
|
||||
|
Loading…
x
Reference in New Issue
Block a user