Add -S|--session <command> option

...to start <command> on startup and to terminate the compositor when
<command> exits.

This is useful for session management as it allows the session client (for
example `lxqt-session`) to terminate labwc - be exiting itself.

Under X, xinit starts the server and keeps it alive for as long as
lxqt-session runs. Thus either the session client starts the Window
Manager, or the Window Manager can be launched independently first.  On
Wayland, the Compositor is both Display Server and Window Manager, so the
described session management mechanisms do not work because the Compositor
needs to be running before the session can function.

As some session clients support both X11 and Wayland, this command line
option avoids re-writes and fragmentation.

Co-authored-by: @Consolatis
This commit is contained in:
Johan Malm 2024-03-09 17:12:54 +00:00 committed by Consolatis
parent 55138dbe0e
commit c841a25acf
6 changed files with 95 additions and 5 deletions

View file

@ -4,6 +4,12 @@
#include <sys/types.h>
/**
* spawn_primary_client - execute asynchronously
* @command: command to be executed
*/
pid_t spawn_primary_client(const char *command);
/**
* spawn_async_no_shell - execute asynchronously
* @command: command to be executed