|
Hermes 0.7.0
Linux game streaming host
|
Set up and check what it takes for Hermes to be reachable before login. More...
#include <optional>#include <string>#include <string_view>#include <vector>Go to the source code of this file.
Classes | |
| struct | platf::prelogin::check_t |
| struct | platf::prelogin::report_t |
| struct | platf::prelogin::sddm_settings_t |
| struct | platf::prelogin::facts_t |
Enumerations | |
| enum class | platf::prelogin::state_e { ready , missing , unknown , note } |
Functions | |
| std::string | platf::prelogin::from_boot_unit (std::string_view packaged_unit, std::string_view source_path) |
| Turn the packaged unit into one that starts with the user manager. | |
| bool | platf::prelogin::is_generated_unit (std::string_view unit) |
Whether unit was written by from_boot_unit(). | |
| bool | platf::prelogin::unit_waits_for_session (std::string_view unit) |
Whether unit depends on a target that only exists once somebody has logged in, whoever wrote it. | |
| sddm_settings_t | platf::prelogin::sddm_settings (const std::vector< std::string > &files) |
| Read SDDM's settings from its configuration files. | |
| report_t | platf::prelogin::assess (const facts_t &facts) |
Decide every check from facts. | |
| std::string | platf::prelogin::state_name (state_e state) |
| facts_t | platf::prelogin::collect_facts () |
| Look at this machine. | |
| report_t | platf::prelogin::report () |
| assess(collect_facts()). | |
| void | platf::prelogin::log_report () |
| Say at startup what stands between this host and being reachable before login. Silent unless Hermes is set to start at boot. | |
| int | platf::prelogin::command (const char *name, int argc, char *argv[]) |
| hermes --prelogin status|enable|disable. | |
Set up and check what it takes for Hermes to be reachable before login.
A host that boots with no monitor and no autologin has nobody to log in at it. Hermes can run from boot and stream the login screen instead, but that rests on several things outside Hermes - its unit starting with the user manager, that manager running at boot, a greeter that lights a new output by itself, and devices it can open with no session of its own. This is the one place that knows the list: hermes --prelogin sets up the part that is Hermes' to set up, and the same checks feed the log and the Web UI.
Definition in file prelogin.h.
|
strong |
| Enumerator | |
|---|---|
| ready | In place. |
| missing | Known to be absent; fix says what to do. |
| unknown | Could not be determined, or not something that has been run. |
| note | Worth saying, and no obstacle. |
Definition at line 23 of file prelogin.h.
| report_t platf::prelogin::assess | ( | const facts_t & | facts | ) |
Decide every check from facts.
Definition at line 492 of file prelogin.cpp.
| facts_t platf::prelogin::collect_facts | ( | ) |
Look at this machine.
Definition at line 565 of file prelogin.cpp.
| int platf::prelogin::command | ( | const char * | name, |
| int | argc, | ||
| char * | argv[] ) |
hermes --prelogin status|enable|disable.
Runs before logging starts and prints to the terminal: starting the log rotates the log file, and this is a command to run while Hermes is up.
Definition at line 632 of file prelogin.cpp.
| std::string platf::prelogin::from_boot_unit | ( | std::string_view | packaged_unit, |
| std::string_view | source_path ) |
Turn the packaged unit into one that starts with the user manager.
The packaged unit starts with the graphical session and stops with it. Its Wants=graphical-session.target cannot simply be kept: pulled in at boot, that target would be active with no session behind it. So every reference to the graphical session goes, and the unit is installed under default.target. The service section is kept as packaged, whatever the packaging made of its start command; a restart policy is added if it had none, since Hermes leaves with the compositor at logout and has to come back for the login screen.
| packaged_unit | The unit file's text. |
| source_path | Where it was read from, for the header. |
Definition at line 395 of file prelogin.cpp.
| bool platf::prelogin::is_generated_unit | ( | std::string_view | unit | ) |
Whether unit was written by from_boot_unit().
Definition at line 366 of file prelogin.cpp.
| void platf::prelogin::log_report | ( | ) |
Say at startup what stands between this host and being reachable before login. Silent unless Hermes is set to start at boot.
Definition at line 613 of file prelogin.cpp.
| report_t platf::prelogin::report | ( | ) |
assess(collect_facts()).
Definition at line 609 of file prelogin.cpp.
| sddm_settings_t platf::prelogin::sddm_settings | ( | const std::vector< std::string > & | files | ) |
Read SDDM's settings from its configuration files.
| files | Their contents in the order SDDM applies them: the vendor directory, /etc/sddm.conf.d, then /etc/sddm.conf, which has the last word. |
Definition at line 463 of file prelogin.cpp.
| std::string platf::prelogin::state_name | ( | state_e | state | ) |
Definition at line 352 of file prelogin.cpp.
| bool platf::prelogin::unit_waits_for_session | ( | std::string_view | unit | ) |
Whether unit depends on a target that only exists once somebody has logged in, whoever wrote it.
Definition at line 375 of file prelogin.cpp.