Commit 497a3984 authored by David Edmundson's avatar David Edmundson Committed by Fabian Vogt
Browse files

[kde-systemd-start-condition] Always return success on non Plasma

If invoked on gnome we should always return success
this is because a desktop file that has X-KDE-AutostartCondition
probably has an X-Gnome- equivalent and we only want one to run
this would match non systemd behaviour.

See also: https://github.com/systemd/systemd/pull/22115
parent c51c908b
Pipeline #126877 passed with stage
in 8 minutes and 41 seconds
......@@ -12,6 +12,14 @@
int main(int argc, char **argv)
{
QCoreApplication app(argc, argv);
// If invoked on gnome we should always return success
// this is because a desktop file that has X-KDE-AutostartCondition
// probably has an X-Gnome- equivalent and we only want one to run
// this would match non systemd behaviour
if (!qEnvironmentVariable("XDG_CURRENT_DESKTOP").split(QLatin1Char(':')).contains("kde", Qt::CaseInsensitive)) {
return 0;
}
QCommandLineParser parser;
parser.setApplicationDescription(QStringLiteral("Checks start condition for a KDE systemd service"));
parser.addHelpOption();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment