Add delay to login startup on Linux

* Fix #5691 - add a 2 second delay to startup on Gnome to allow for tray initialization and Auto-Type shortcut registration. On KDE, start after the panel is started.
This commit is contained in:
Jonathan White 2020-11-19 22:08:49 -05:00
parent 2fe9ea3f41
commit a273deae12

View File

@ -107,7 +107,9 @@ void NixUtils::setLaunchAtStartup(bool enable)
<< QStringLiteral("Version=1.0") << "true" << '\n'
<< QStringLiteral("Categories=Utility;Security;Qt;") << '\n'
<< QStringLiteral("MimeType=application/x-keepass2;") << '\n'
<< QStringLiteral("X-GNOME-Autostart-enabled=true") << endl;
<< QStringLiteral("X-GNOME-Autostart-enabled=true") << '\n'
<< QStringLiteral("X-GNOME-Autostart-Delay=2") << '\n'
<< QStringLiteral("X-KDE-autostart-after=panel") << endl;
desktopFile.close();
} else if (isLaunchAtStartupEnabled()) {
QFile::remove(getAutostartDesktopFilename());