gardesk/gardm / fc6c115

Browse files

greeter: Split session exec command on whitespace

Session desktop files like Plasma's have multi-word Exec lines
(e.g., "/usr/libexec/plasma-dbus-run-session-if-needed /usr/bin/startplasma-wayland").
Split the exec string into command and arguments so these sessions
can be launched correctly.
Authored by mfwolffe <wolffemf@dukes.jmu.edu>
SHA
fc6c11563568635c753c4df427074e2ad3d8a2dd
Parents
5624ed9
Tree
1584435

1 changed file

StatusFile+-
M gardm-greeter/src/main.rs 5 1
gardm-greeter/src/main.rsmodified
@@ -526,7 +526,11 @@ async fn handle_login(
526526
             form.set_info("Starting session...".to_string());
527527
 
528528
             // Start session with selected session command
529
-            let session_cmd = vec![session_exec.to_string()];
529
+            // Split exec on whitespace to separate command from arguments
530
+            let session_cmd: Vec<String> = session_exec
531
+                .split_whitespace()
532
+                .map(String::from)
533
+                .collect();
530534
             tracing::info!(?session_cmd, %session_type, "Starting session");
531535
 
532536
             let response = client