2020-09-05 15:18:05 +01:00
|
|
|
From d653bc84c8aed33072237ed858194a8a73b6a2e7 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Tom Hall <tahall256@protonmail.ch>
|
|
|
|
Date: Mon, 7 Sep 2020 18:09:52 +0100
|
|
|
|
Subject: [PATCH] startkde
|
2020-01-28 13:20:48 +00:00
|
|
|
|
|
|
|
---
|
2020-09-05 15:18:05 +01:00
|
|
|
startkde/plasma-session/startup.cpp | 2 +-
|
2020-01-28 13:20:48 +00:00
|
|
|
startkde/startplasma-waylandsession.cpp | 2 +-
|
|
|
|
startkde/startplasma-x11.cpp | 2 +-
|
2020-09-05 15:18:05 +01:00
|
|
|
startkde/startplasma.cpp | 22 +++++++++-------------
|
|
|
|
4 files changed, 12 insertions(+), 16 deletions(-)
|
2020-01-28 13:20:48 +00:00
|
|
|
|
2020-09-05 15:18:05 +01:00
|
|
|
diff --git a/startkde/plasma-session/startup.cpp b/startkde/plasma-session/startup.cpp
|
|
|
|
index 89cc144ba..8ca9e81d2 100644
|
|
|
|
--- a/startkde/plasma-session/startup.cpp
|
|
|
|
+++ b/startkde/plasma-session/startup.cpp
|
|
|
|
@@ -210,7 +210,7 @@ Startup::Startup(QObject *parent):
|
|
|
|
upAndRunning(QStringLiteral("ksmserver"));
|
|
|
|
const AutoStart autostart;
|
|
|
|
|
|
|
|
- QProcess::execute(QStringLiteral(CMAKE_INSTALL_FULL_LIBEXECDIR_KF5 "/start_kdeinit_wrapper"));
|
|
|
|
+ QProcess::execute(QStringLiteral(NIXPKGS_START_KDEINIT_WRAPPER));
|
|
|
|
|
|
|
|
KJob* phase1;
|
|
|
|
QProcessEnvironment kdedProcessEnv;
|
2020-01-28 13:20:48 +00:00
|
|
|
diff --git a/startkde/startplasma-waylandsession.cpp b/startkde/startplasma-waylandsession.cpp
|
2020-09-05 15:18:05 +01:00
|
|
|
index f59654d18..5e3a93db0 100644
|
2020-01-28 13:20:48 +00:00
|
|
|
--- a/startkde/startplasma-waylandsession.cpp
|
|
|
|
+++ b/startkde/startplasma-waylandsession.cpp
|
2020-09-05 15:18:05 +01:00
|
|
|
@@ -66,7 +66,7 @@ int main(int argc, char** argv)
|
2020-01-28 13:20:48 +00:00
|
|
|
waitForKonqi();
|
|
|
|
out << "startplasma-waylandsession: Shutting down...\n";
|
|
|
|
|
|
|
|
- runSync(QStringLiteral("kdeinit5_shutdown"), {});
|
|
|
|
+ runSync(QStringLiteral(NIXPKGS_KDEINIT5_SHUTDOWN), {});
|
|
|
|
|
|
|
|
cleanupX11();
|
|
|
|
out << "startplasma-waylandsession: Done.\n";
|
|
|
|
diff --git a/startkde/startplasma-x11.cpp b/startkde/startplasma-x11.cpp
|
2020-09-05 15:18:05 +01:00
|
|
|
index ae1c4d101..0df24b5be 100644
|
2020-01-28 13:20:48 +00:00
|
|
|
--- a/startkde/startplasma-x11.cpp
|
|
|
|
+++ b/startkde/startplasma-x11.cpp
|
2020-09-05 15:18:05 +01:00
|
|
|
@@ -110,7 +110,7 @@ int main(int argc, char** argv)
|
2020-01-28 13:20:48 +00:00
|
|
|
|
|
|
|
out << "startkde: Shutting down...\n";
|
|
|
|
|
|
|
|
- runSync(QStringLiteral("kdeinit5_shutdown"), {});
|
|
|
|
+ runSync(QStringLiteral(NIXPKGS_KDEINIT5_SHUTDOWN), {});
|
|
|
|
|
|
|
|
cleanupPlasmaEnvironment();
|
|
|
|
cleanupX11();
|
|
|
|
diff --git a/startkde/startplasma.cpp b/startkde/startplasma.cpp
|
2020-09-05 15:18:05 +01:00
|
|
|
index a055d5635..62afb1513 100644
|
2020-01-28 13:20:48 +00:00
|
|
|
--- a/startkde/startplasma.cpp
|
|
|
|
+++ b/startkde/startplasma.cpp
|
2020-09-05 15:18:05 +01:00
|
|
|
@@ -40,7 +40,7 @@ QTextStream out(stderr);
|
2020-01-28 13:20:48 +00:00
|
|
|
void messageBox(const QString &text)
|
|
|
|
{
|
|
|
|
out << text;
|
|
|
|
- runSync(QStringLiteral("xmessage"), {QStringLiteral("-geometry"), QStringLiteral("500x100"), text});
|
|
|
|
+ runSync(QStringLiteral(NIXPKGS_XMESSAGE), {QStringLiteral("-geometry"), QStringLiteral("500x100"), text});
|
|
|
|
}
|
|
|
|
|
|
|
|
QStringList allServices(const QLatin1String& prefix)
|
2020-09-05 15:18:05 +01:00
|
|
|
@@ -261,15 +261,15 @@ void setupX11()
|
2020-01-28 13:20:48 +00:00
|
|
|
// If the user has overwritten fonts, the cursor font may be different now
|
|
|
|
// so don't move this up.
|
|
|
|
|
|
|
|
- runSync(QStringLiteral("xsetroot"), {QStringLiteral("-cursor_name"), QStringLiteral("left_ptr")});
|
|
|
|
- runSync(QStringLiteral("xprop"), {QStringLiteral("-root"), QStringLiteral("-f"), QStringLiteral("KDE_FULL_SESSION"), QStringLiteral("8t"), QStringLiteral("-set"), QStringLiteral("KDE_FULL_SESSION"), QStringLiteral("true")});
|
|
|
|
- runSync(QStringLiteral("xprop"), {QStringLiteral("-root"), QStringLiteral("-f"), QStringLiteral("KDE_SESSION_VERSION"), QStringLiteral("32c"), QStringLiteral("-set"), QStringLiteral("KDE_SESSION_VERSION"), QStringLiteral("5")});
|
|
|
|
+ runSync(QStringLiteral(NIXPKGS_XSETROOT), {QStringLiteral("-cursor_name"), QStringLiteral("left_ptr")});
|
|
|
|
+ runSync(QStringLiteral(NIXPKGS_XPROP), {QStringLiteral("-root"), QStringLiteral("-f"), QStringLiteral("KDE_FULL_SESSION"), QStringLiteral("8t"), QStringLiteral("-set"), QStringLiteral("KDE_FULL_SESSION"), QStringLiteral("true")});
|
|
|
|
+ runSync(QStringLiteral(NIXPKGS_XPROP), {QStringLiteral("-root"), QStringLiteral("-f"), QStringLiteral("KDE_SESSION_VERSION"), QStringLiteral("32c"), QStringLiteral("-set"), QStringLiteral("KDE_SESSION_VERSION"), QStringLiteral("5")});
|
|
|
|
}
|
|
|
|
|
|
|
|
void cleanupX11()
|
|
|
|
{
|
|
|
|
- runSync(QStringLiteral("xprop"), { QStringLiteral("-root"), QStringLiteral("-remove"), QStringLiteral("KDE_FULL_SESSION") });
|
|
|
|
- runSync(QStringLiteral("xprop"), { QStringLiteral("-root"), QStringLiteral("-remove"), QStringLiteral("KDE_SESSION_VERSION") });
|
|
|
|
+ runSync(QStringLiteral(NIXPKGS_XPROP), { QStringLiteral("-root"), QStringLiteral("-remove"), QStringLiteral("KDE_FULL_SESSION") });
|
|
|
|
+ runSync(QStringLiteral(NIXPKGS_XPROP), { QStringLiteral("-root"), QStringLiteral("-remove"), QStringLiteral("KDE_SESSION_VERSION") });
|
|
|
|
}
|
|
|
|
|
|
|
|
// TODO: Check if Necessary
|
2020-09-05 15:18:05 +01:00
|
|
|
@@ -286,11 +286,7 @@ bool syncDBusEnvironment()
|
2020-01-28 13:20:48 +00:00
|
|
|
{
|
|
|
|
int exitCode;
|
|
|
|
// At this point all environment variables are set, let's send it to the DBus session server to update the activation environment
|
|
|
|
- if (!QStandardPaths::findExecutable(QStringLiteral("dbus-update-activation-environment")).isEmpty()) {
|
|
|
|
- exitCode = runSync(QStringLiteral("dbus-update-activation-environment"), { QStringLiteral("--systemd"), QStringLiteral("--all") });
|
|
|
|
- } else {
|
|
|
|
- exitCode = runSync(QStringLiteral(CMAKE_INSTALL_FULL_LIBEXECDIR "/ksyncdbusenv"), {});
|
|
|
|
- }
|
2020-09-05 15:18:05 +01:00
|
|
|
+ exitCode = runSync(QStringLiteral(NIXPKGS_DBUS_UPDATE_ACTIVATION_ENVIRONMENT), { QStringLiteral("--systemd"), QStringLiteral("--all") });
|
2020-01-28 13:20:48 +00:00
|
|
|
return exitCode == 0;
|
|
|
|
}
|
|
|
|
|
2020-09-05 15:18:05 +01:00
|
|
|
@@ -306,7 +302,7 @@ void setupFontDpi()
|
2020-01-28 13:20:48 +00:00
|
|
|
//TODO port to c++?
|
|
|
|
const QByteArray input = "Xft.dpi: " + QByteArray::number(fontsCfg.readEntry("forceFontDPI", 0));
|
|
|
|
QProcess p;
|
|
|
|
- p.start(QStringLiteral("xrdb"), { QStringLiteral("-quiet"), QStringLiteral("-merge"), QStringLiteral("-nocpp") });
|
|
|
|
+ p.start(QStringLiteral(NIXPKGS_XRDB), { QStringLiteral("-quiet"), QStringLiteral("-merge"), QStringLiteral("-nocpp") });
|
|
|
|
p.setProcessChannelMode(QProcess::ForwardedChannels);
|
|
|
|
p.write(input);
|
|
|
|
p.closeWriteChannel();
|
2020-09-05 15:18:05 +01:00
|
|
|
@@ -328,7 +324,7 @@ QProcess* setupKSplash()
|
2020-01-28 13:20:48 +00:00
|
|
|
KConfigGroup ksplashCfg = cfg.group("KSplash");
|
|
|
|
if (ksplashCfg.readEntry("Engine", QStringLiteral("KSplashQML")) == QLatin1String("KSplashQML")) {
|
|
|
|
p = new QProcess;
|
|
|
|
- p->start(QStringLiteral("ksplashqml"), { ksplashCfg.readEntry("Theme", QStringLiteral("Breeze")) });
|
|
|
|
+ p->start(QStringLiteral(CMAKE_INSTALL_FULL_BINDIR "/ksplashqml"), { ksplashCfg.readEntry("Theme", QStringLiteral("Breeze")) });
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return p;
|
|
|
|
--
|
2020-09-05 15:18:05 +01:00
|
|
|
2.28.0
|
2020-01-28 13:20:48 +00:00
|
|
|
|