ignore seat0 on gdm
Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
parent
10eddc139c
commit
a94052a24a
@ -135,7 +135,7 @@ pub fn get_values_of_seat0_with_gdm_wayland(indices: &[usize]) -> Vec<String> {
|
||||
fn _get_values_of_seat0(indices: &[usize], ignore_gdm_wayland: bool) -> Vec<String> {
|
||||
if let Ok(output) = run_loginctl(None) {
|
||||
for line in String::from_utf8_lossy(&output.stdout).lines() {
|
||||
if line.contains("seat0") {
|
||||
if !line.contains("gdm") && line.contains("seat0") {
|
||||
if let Some(sid) = line.split_whitespace().next() {
|
||||
if is_active(sid) {
|
||||
if ignore_gdm_wayland {
|
||||
|
@ -237,7 +237,7 @@ impl DesktopEnv {
|
||||
fn get_env_seat0(&mut self) -> ResultType<bool> {
|
||||
let output = Command::new("loginctl").output()?;
|
||||
for line in String::from_utf8_lossy(&output.stdout).lines() {
|
||||
if line.contains("seat0") {
|
||||
if !line.contains("gdm") && line.contains("seat0") {
|
||||
if let Some(sid) = line.split_whitespace().nth(0) {
|
||||
if Self::is_active(sid)? {
|
||||
if let Some(uid) = line.split_whitespace().nth(1) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user