gardesk/gardm / 7331030

Browse files

greeter: use pkill -f for NixOS wrapper compatibility

Authored by mfwolffe <wolffemf@dukes.jmu.edu>
SHA
73310304772dd881e4a355436ad7e419845ea27f
Parents
a5bf030
Tree
621091f

1 changed file

StatusFile+-
M gardm-greeter/src/main.rs 3 1
gardm-greeter/src/main.rsmodified
@@ -642,7 +642,9 @@ fn kill_leftover_compositors() {
642
     let compositors = ["garchomp", "picom", "compton", "xcompmgr"];
642
     let compositors = ["garchomp", "picom", "compton", "xcompmgr"];
643
 
643
 
644
     for name in compositors {
644
     for name in compositors {
645
-        match Command::new("pkill").args(["-x", name]).status() {
645
+        // Use -f to match full command line (needed for NixOS wrappers
646
+        // where process names are like .garchomp-wrapped)
647
+        match Command::new("pkill").args(["-f", name]).status() {
646
             Ok(status) if status.success() => {
648
             Ok(status) if status.success() => {
647
                 tracing::info!("Killed leftover compositor: {}", name);
649
                 tracing::info!("Killed leftover compositor: {}", name);
648
                 // Give it a moment to exit and release X resources
650
                 // Give it a moment to exit and release X resources