[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
wilder-5.25
David Edmundson 4 years ago committed by Fabian Vogt
parent c51c908b16
commit 497a3984a9
  1. 8
      startkde/systemd/kde-systemd-start-condition.cpp

@ -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();

Loading…
Cancel
Save