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,19 @@
|
||||
#include "session-launcher.h"
|
||||
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
// Installed setuid-free helper started by session-launcher.cpp through pkexec:
|
||||
// it is the only part of the tool that runs as root, and only for as long as one
|
||||
// launch takes.
|
||||
int main(int argc, char** argv) {
|
||||
if (argc < 2 || std::string(argv[1]) != "launch") {
|
||||
std::cerr << "Usage : fws-deskmanager-launch launch <utilisateur> <session.desktop>\n";
|
||||
return 1;
|
||||
}
|
||||
if (argc != 4) {
|
||||
std::cerr << "Usage : fws-deskmanager-launch launch <utilisateur> <session.desktop>\n";
|
||||
return 1;
|
||||
}
|
||||
return fws::runLaunchHelper(argv[2], argv[3]);
|
||||
}
|
||||
Reference in new issue
Block a user