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.
This commit is contained in:
11 files changed
+709
-38
No files matched your search
@@ -0,0 +1,30 @@
|
||||
#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
|
||||
Reference in new issue
Block a user