Files
FWS-DeskManger/src/session-launcher.h
T
BlackAngelTV e47fd92f47 feat(launch): start desktops without the login screen
The greeter only starts the session its own selector points at, so an
installed environment with no open session could not be reached from
the tool. Starting one needs a one-shot autologin drop-in, a display
manager restart and a guaranteed cleanup, all as root: keep that in a
small pkexec helper so the CLI and the GTK window stay unprivileged.
2026-11-13 16:27:41 +01:00

31 lines
982 B
C++

#pragma once
#include <string>
#include "desktop-catalog.h"
namespace fws {
struct LaunchOutcome {
bool ok = false;
std::string error;
};
// Installed session file (.desktop stem) of the profile, empty when the
// environment itself is missing.
std::string installedSessionFile(const DesktopProfile& profile);
// True when the display manager can be driven by a one-shot autologin, which is
// what makes starting a session possible without picking it in the greeter.
bool canStartWithoutGreeter(std::string& reason);
// Activates the profile's running session, or starts one through the privileged
// helper (polkit) and closes the sessions it replaces.
LaunchOutcome launchDesktop(const DesktopProfile& profile);
// Privileged side, run by fws-deskmanager-launch as root. Returns 0 when the
// requested session took the seat and the replaced sessions are closing.
int runLaunchHelper(const std::string& user, const std::string& sessionFile);
} // namespace fws