Fuck systemd, freezing process on xdg autostart

This commit is contained in:
dec05eba
2026-03-29 18:38:17 +02:00
parent 106e7febe5
commit 33bc121bc8
3 changed files with 52 additions and 3 deletions

View File

@@ -308,8 +308,11 @@ int main(int argc, char **argv) {
rpc_add_commands(rpc.get(), overlay.get());
// Evacuating from lennart's botnet to XDG (a.k.a. 'the spec that nobody actually follows').
// TODO: Remove all this garbage related to systemd in 1-2 months and remove the systemd service file as well.
// This garbage shit is needed because the systemd user daemon isn't always available at xdg autostart o algo
const bool systemd_service_ready = gsr::wait_until_systemd_user_service_available();
constexpr const char *deprecated_systemd_service_name = "gpu-screen-recorder-ui.service";
if(gsr::is_systemd_service_enabled(deprecated_systemd_service_name)) {
if(systemd_service_ready && gsr::is_systemd_service_enabled(deprecated_systemd_service_name)) {
const int autostart_result = gsr::set_xdg_autostart(true);
if(autostart_result == 67) {
const bool is_flatpak = getenv("FLATPAK_ID") != nullptr;