File indexing completed on 2024-05-05 05:38:57
0001 /* 0002 SPDX-FileCopyrightText: 2019 Aleix Pol Gonzalez <aleixpol@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #pragma once 0008 0009 #include "config-startplasma.h" 0010 #include "kcheckrunning/kcheckrunning.h" 0011 #include <ksplashinterface.h> 0012 #include <optional> 0013 0014 extern QTextStream out; 0015 0016 void sigtermHandler(int signalNumber); 0017 QStringList allServices(const QLatin1String &prefix); 0018 int runSync(const QString &program, const QStringList &args, const QStringList &env = {}); 0019 void sourceFiles(const QStringList &files); 0020 void messageBox(const QString &text); 0021 0022 void createConfigDirectory(); 0023 void runStartupConfig(); 0024 void setupCursor(bool wayland); 0025 std::optional<QProcessEnvironment> getSystemdEnvironment(); 0026 void importSystemdEnvrionment(); 0027 void runEnvironmentScripts(); 0028 void setupPlasmaEnvironment(); 0029 void cleanupPlasmaEnvironment(const std::optional<QProcessEnvironment> &oldSystemdEnvironment); 0030 bool syncDBusEnvironment(); 0031 void setupFontDpi(); 0032 QProcess *setupKSplash(); 0033 0034 bool startPlasmaSession(bool wayland); 0035 0036 void waitForKonqi(); 0037 0038 void playStartupSound(); 0039 0040 void gentleTermination(QProcess *process); 0041 0042 struct KillBeforeDeleter { 0043 void operator()(QProcess *pointer) 0044 { 0045 if (pointer) { 0046 gentleTermination(pointer); 0047 } 0048 delete pointer; 0049 } 0050 };