Linux: Add autostart delay to avoid tray issues #6518
authorChristian Kamm <mail@ckamm.de>
Wed, 13 Mar 2019 09:47:41 +0000 (10:47 +0100)
committerKevin Ottens <kevin.ottens@nextcloud.com>
Tue, 15 Dec 2020 09:58:43 +0000 (10:58 +0100)
It seems that sometimes the tray implementation isn't ready on system
startup. Retrying later seems to not help. Delaying the start of the
client is the workaround that people have reported as effective.

src/common/utility_unix.cpp

index 3ae4d671e4692c8264f5d1b453762486588c6086..a5f257d0771ade7a0bf5cc50e4225569b2380829 100644 (file)
@@ -82,7 +82,8 @@ void setLaunchOnStartup_private(const QString &appName, const QString &guiName,
            << QLatin1String("Categories=") << QLatin1String("Network") << endl
            << QLatin1String("Type=") << QLatin1String("Application") << endl
            << QLatin1String("StartupNotify=") << "false" << endl
-           << QLatin1String("X-GNOME-Autostart-enabled=") << "true" << endl;
+           << QLatin1String("X-GNOME-Autostart-enabled=") << "true" << endl
+           << QLatin1String("X-GNOME-Autostart-Delay=10") << endl;
     } else {
         if (!QFile::remove(desktopFileLocation)) {
             qCWarning(lcUtility) << "Could not remove autostart desktop file";