Launches that fail say why: command, exit status and what it printed
CI / test (push) Canceled after 17m11s
CI / test (push) Canceled after 17m11s
V: "kwi not starting from app menu or dock". Kwi is a Flatpak, and bwrap died
before it opened a window ("Can't find source path /run/user/1000/doc/by-app/
org.kde.kwi"); Chandra forked apps and forgot them, so the failure only reached
the session log and the click did nothing visible.
Every app the Applications menu, the dock, Super+1..9 and session restore start
now runs under a small monitor (sys spawn-watch, compositor/sys/sys_stub.c): it
copies the app's output to the session log as before, keeps its last 2 KiB,
and reports how sh -c CMD exited on a socket the main loop wakes on. The shell
(compositor/shell/launch.mbt) shows a red error notice for 15 s, and logs it,
when the app exits non-zero or by a signal within 30 s, or exits 0 without ever
opening a window here (after a 2 s grace for single-instance hand-offs): the
first line says what happened, then the command and the last lines it printed,
repeats folded ("(3 times)"). Status 127/126 say "command not found" / "not
executable". Launched apps no longer inherit the compositor's fds.
chandra-ctl launch ID starts a desktop app exactly as the dock does.
Tests: compositor/host/launch_test.mbt (bwrap-style failure incl. drawn notice,
127, SIGSEGV, exit 0 without a window, an app that keeps running), unit tests
in launch.mbt. Checked end to end with build/wasmhost + compositor.wasm
headless and a Flatpak-style kwi desktop file: chandra-ctl launch org.kde.kwi
shows the notice.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DPL5hiGJWeuHiTgtoyB4kb
This commit is contained in:
18 files changed
+686
-30
No files matched your search
@@ -210,6 +210,7 @@ pub fn ChandraCompositor::control_command(self : ChandraCompositor, line : Strin
|
||||
"reload load every panel module again from disk", "reload NAME only the modules whose name, slot or path is NAME",
|
||||
"shortcut ID do what shortcut ID does (launcher, overview, show-desktop, ...)",
|
||||
"kiosk [lock|unlock|status] kiosk mode (--kiosk): lock it down or unlock it for admin work",
|
||||
"launch ID start desktop app ID (e.g. org.kde.kwi) as the dock does; a failed start shows its notice",
|
||||
"windows each window: frame, layout, box, shadow, size limits; and what is under the pointer",
|
||||
"auth-demo [MODE] show the password dialog with a pretend check (password \"demo\"); MODE: " +
|
||||
@polkit.demo_modes.join(", "),
|
||||
@@ -276,6 +277,20 @@ pub fn ChandraCompositor::control_command(self : ChandraCompositor, line : Strin
|
||||
}
|
||||
(out, ok)
|
||||
}
|
||||
"launch" => {
|
||||
if words.length() != 2 {
|
||||
return (["error usage: launch DESKTOP-ID"], false)
|
||||
}
|
||||
match self.shell.command_for(words[1]) {
|
||||
Some(cmd) =>
|
||||
if self.shell.start_app(words[1], cmd) {
|
||||
(["ok started: " + cmd + " (a failed start shows a notice and goes to the session log)"], true)
|
||||
} else {
|
||||
(["error could not create a process for: " + cmd], false)
|
||||
}
|
||||
None => (["error no installed .desktop file has the id " + words[1]], false)
|
||||
}
|
||||
}
|
||||
"shortcut" => {
|
||||
if words.length() != 2 {
|
||||
return (["error usage: shortcut ID"], false)
|
||||
|
||||
Reference in new issue
Block a user