#pragma once #include #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