SUMMARY KDE does not auto-start applications - getting this error.. *** Jun 14 16:42:05 xWx systemd-xdg-autostart-generator[1322]: /home/wolfyrion/.config/autostart/org.kde.latte-dock.desktop:9: Unknown key name 'InitialPreference' in section 'Desktop Entry', ignoring. Jun 14 16:42:05 xWx systemd-xdg-autostart-generator[1322]: /home/wolfyrion/.config/autostart/org.kde.latte-dock.desktop:17: Unknown key name 'TerminalOptions' in section 'Desktop Entry', ignoring. Jun 14 16:42:05 xWx systemd-xdg-autostart-generator[1322]: Configuration file /home/wolfyrion/.config/autostart/xdotool.desktop is marked executable. Please remove executable permission bits. Proceeding anyway. Jun 14 16:42:05 xWx systemd-xdg-autostart-generator[1322]: /home/wolfyrion/.config/autostart/xdotool.desktop:15: Unknown key name 'TerminalOptions' in section 'Desktop Entry', ignoring. Jun 14 16:42:05 xWx systemd-xdg-autostart-generator[1322]: /home/wolfyrion/.config/autostart/cadence.desktop:1: Unknown section 'Carla Shortcut Group'. Ignoring. Jun 14 16:42:05 xWx systemd-xdg-autostart-generator[1322]: /home/wolfyrion/.config/autostart/cadence.desktop:6: Unknown section 'CarlaControl Shortcut Group'. Ignoring. Jun 14 16:42:05 xWx systemd-xdg-autostart-generator[1322]: /home/wolfyrion/.config/autostart/cadence.desktop:11: Unknown section 'Catia Shortcut Group'. Ignoring. Jun 14 16:42:05 xWx systemd-xdg-autostart-generator[1322]: /home/wolfyrion/.config/autostart/cadence.desktop:16: Unknown section 'Claudia Shortcut Group'. Ignoring. Jun 14 16:42:05 xWx systemd-xdg-autostart-generator[1322]: /home/wolfyrion/.config/autostart/cadence.desktop:21: Unknown section 'ClaudiaLauncher Shortcut Group'. Ignoring NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols. See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports *** STEPS TO REPRODUCE 1. just add latte to autostart 2. 3. OBSERVED RESULT EXPECTED RESULT SOFTWARE/OS VERSIONS Windows: macOS: Linux/KDE Plasma: Arch (available in About System) KDE Plasma Version: 5.25.0 KDE Frameworks Version: 5.95.0 Qt Version: 5.15.4 ADDITIONAL INFORMATION
Possibly caused by the systemd boot which we turned on by default in 5.25. You can verify by turning it off with `kwriteconfig5 --file startkderc --group General --key systemdBoot false` and then rebooting. Does that fix it?
(In reply to Nate Graham from comment #1) > Possibly caused by the systemd boot which we turned on by default in 5.25. > > You can verify by turning it off with `kwriteconfig5 --file startkderc > --group General --key systemdBoot false` and then rebooting. Does that fix > it? yes thank you very much it fix it! :)
Thanks.
Can I have the full wolfyrion/.config/autostart/cadence.desktop As well as output of `journalctl --user -b` from a reboot with the broken behaviour re-enabled.
Marking as needsinfo. I was unable to reproduce any issue locally.
I still need this information, we've taken the time to help you suppress the problem but we still need to fix it properly for other users.
I'm affected by this bug too. I have 6 apps set to autostart, but only one is currrently starting (Yakuake). X11 plasma session. from `journalctl -b` I can see this: ` jun 23 15:30:17 anarch systemd-xdg-autostart-generator[1518]: /home/henrique/.config/autostart/copyq.desktop:181: Invalid value for boolean: False jun 23 15:30:17 anarch systemd-xdg-autostart-generator[1518]: /home/henrique/.config/autostart/copyq.desktop:181: Failed to parse file: Invalid argument jun 23 15:30:17 anarch systemd-xdg-autostart-generator[1518]: Failed to parse /home/henrique/.config/autostart/copyq.desktop, ignoring it jun 23 15:30:17 anarch systemd-xdg-autostart-generator[1518]: /home/henrique/.config/autostart/insync.desktop:15: Unknown key name 'TerminalOptions' in section 'Desktop Entry', ignoring. jun 23 15:30:17 anarch systemd-xdg-autostart-generator[1518]: /home/henrique/.config/autostart/org.kde.latte-dock.desktop:43: Unknown key name 'InitialPreference' in section 'Desktop Entry', ignoring. jun 23 15:30:17 anarch systemd-xdg-autostart-generator[1518]: Configuration file /home/henrique/.config/autostart/org.kde.yakuake.desktop is marked executable. Please remove executable permission bits. Proceeding anyway. jun 23 15:30:17 anarch systemd-xdg-autostart-generator[1518]: /home/henrique/.config/autostart/org.kde.yakuake.desktop:163: Unknown key name 'TerminalOptions' in section 'Desktop Entry', ignoring. jun 23 15:30:17 anarch systemd-xdg-autostart-generator[1518]: Configuration file /home/henrique/.config/autostart/telegramdesktop.desktop is marked executable. Please remove executable permission bits. Proceeding anyway. jun 23 15:30:17 anarch systemd-xdg-autostart-generator[1518]: /home/henrique/.config/autostart/telegramdesktop.desktop:18: Unknown key name 'TerminalOptions' in section 'Desktop Entry', ignoring. jun 23 15:30:17 anarch systemd-xdg-autostart-generator[1518]: Configuration file /home/henrique/.config/autostart/goldendict.desktop is marked executable. Please remove executable permission bits. Proceeding anyway. jun 23 15:30:17 anarch systemd-xdg-autostart-generator[1518]: /home/henrique/.config/autostart/goldendict.desktop:16: Unknown key name 'TerminalOptions' in section 'Desktop Entry', ignoring. `
Created attachment 150104 [details] the desktop generates log error and the app will not be autostarted jun 23 15:30:17 anarch systemd-xdg-autostart-generator[1518]: /home/henrique/.config/autostart/copyq.desktop:181: Invalid value for boolean: False jun 23 15:30:17 anarch systemd-xdg-autostart-generator[1518]: /home/henrique/.config/autostart/copyq.desktop:181: Failed to parse file: Invalid argument jun 23 15:30:17 anarch systemd-xdg-autostart-generator[1518]: Failed to parse /home/henrique/.config/autostart/copyq.desktop, ignoring it
Those look like valid errors to me; seems like your autostarted apps' .desktop files are malformed and can't be parsed. It might be good to bubble up this error in the UI somewhere, but ultimately the solution there is for those malformed files to be fixed.
181: Hidden=False spec says: " Values of type boolean must either be the string true or false. " xdg generator must be case sensitive, KDE's isn't. It is pretty extreme to fail rather than just ignore the relevant entry. I can maybe change that upstream. I can go through any other broken desktop files. Though I'm sure it'll all come down to stricter spec compliance.
Changing the parser to be less strict might make sense, but regardless, we should show these errors to the user, probably in the autostart KCM. That way they can see what's going on and figure out what to do about it, or at least whose fault it might be. For that, I have filed Bug 455889.
And I'll close this
I don't think RESOLVED NOT A BUG is the correct resolution. Apps not auto-starting as expected is definitely a bug, and showing the errors to the user doesn't change that. We can say it's a bug in the XDG parser being too strict, in which case it's RESOLVED UPSTREAM. Or we can say it's a bug in the specific apps having malformed desktop files, in which case it's RESOLVED DOWNSTREAM. Which one shall it be?
I suggest that for every ".desktop" file that cannot be auto-started, a notification be generated for the user, so that the user knows that that specific application could not be started automatically. Furthermore, it is important that in the configuration screen for automatic startup it is clear to the user which of the listed applications will never be started and, if possible, for what reason. Waiting for users to realize for themselves that a certain application did not start when it should and that after that they have to investigate in the logs why the application was not started, does not seem to me to be an desirable behavior. Therefore, I consider that this is a bug, whatever the solution that is developed to fix it.
The "TerminalOptions=" parameter, which makes ".desktop" files invalid, is added by Plasma. To reproduce: In the startup and shutdown settings click on Properties for any listed application, then enter the Application tab of the properties window, edit the command line and then press the OK button. As a result, the ".desktop" file now has the invalid parameter "TerminalOptions=" which prevents the application from auto-starting.
(In reply to Henrique Sant'Anna from comment #14) > I suggest that for every ".desktop" file that cannot be auto-started, a > notification be generated for the user, so that the user knows that that > specific application could not be started automatically. > > Furthermore, it is important that in the configuration screen for automatic > startup it is clear to the user which of the listed applications will never > be started and, if possible, for what reason. > > Waiting for users to realize for themselves that a certain application did > not start when it should and that after that they have to investigate in the > logs why the application was not started, does not seem to me to be an > desirable behavior. > > Therefore, I consider that this is a bug, whatever the solution that is > developed to fix it. Yes, that's what bug 455889 is all about.
(In reply to Henrique Sant'Anna from comment #15) > The "TerminalOptions=" parameter, which makes ".desktop" files invalid, is > added by Plasma. > To reproduce: > In the startup and shutdown settings click on Properties for any listed > application, then enter the Application tab of the properties window, edit > the command line and then press the OK button. > > As a result, the ".desktop" file now has the invalid parameter > "TerminalOptions=" which prevents the application from auto-starting. Can you please file a new bug report about that specifically, and paste the link to it here? Thanks!
I too faced this issue with ssh-add [Desktop Entry] Exec=ssh-add -q /home/username/.ssh/id_rsa_some_key The .desktop file now requires full path, and does not recognize ( "~" / tilde character ) for home i.e Exec=ssh-add -q ~/.ssh/id_rsa_some_key does not work. (Just documenting this path issue somewhere)
I just updated to Plasma 2.25 (2.25.5) from backports-extra repository and this issue hit me. Yes, `kwriteconfig5 --file startkderc --group General --key systemdBoot false` fixes it. But I think this is still a KDE bug and should be reopened. Why? Those files in ~/.config/autostart were generated by previous versions of KDE, and they worked perfectly fine. Now after the update they just stopped working. So it's a KDE bug that breaks users' desktops heavily. *Something* should be done about it. 1. Can those files be automatically fixed if they are not valid .desktop files? 2. Can the files that fail to run using the new systemd boot method be detected? And can they be handled by the KDE startup process and actually *run* using the old way? Side note: Running .desktop file commands like `sleep 3 && something` used to work fine, and now it doesn't. It would be nice to still have support for that.
*Plasma 5.25
I have to agree. From the Plasma user's perspective, something that was working that was under KDE's control broke. The fact that it broke because under the hood, Plasma switched to a different technical system that has stricter parsing requirements doesn't make it not Plasma's bug. Plasma chose to make that change and thus owns any regressions stemming from it. So have two options: 1. Patch Plasma by reformatting now-invalid desktop files to be valid, in which case it remains our bug to fix. Changing anything with `=False` to be `=false` should hopefully not be that hard. 2. Patch systemd-xdg-autostart-generator to not be so strict, in which case it will be an upstream bug, but we should really submit the fix since we're affected by it. We can do one or both, I don't think we have the option to do neither and call it not a bug.
>1. Patch Plasma by reformatting now-invalid desktop files to be valid Most the malformed desktop files come from hand-written users. The problem with any migration after-the-fact is that by the time this lands all affected users would have fixed their desktop files anyway. If this had been reported in the year when systemd was exclusively opt-in I'd have a different attitude but now it's in diminishing returns if there's any at all. >2. Patch systemd-xdg-autostart-generator to not be so strict There's a few separate issues discussed here. - false/False. I reckon upstream would accept a fix for that. Worth a go. - "~" expansion. This is 50/50. The spec doesn't explicitly say it'll expand. - Invalid Exec lines. This would definitely be rejected upstream. It's not systemd doing stricter parsing, it's KDE doing something additional and yolo. >I don't think we have the option to do neither and call it not a bug. I will try the above two changes in systemd. I can change kmenuedit to be clearer on the Exec line. We can leave 455889 open. After that I don't think we have any sensible option on this bug other than to close it as downstream.
(In reply to nightBulb from comment #18) > I too faced this issue with ssh-add > > [Desktop Entry] > Exec=ssh-add -q /home/username/.ssh/id_rsa_some_key > > The .desktop file now requires full path, and does not recognize ( "~" / > tilde character ) for home > > i.e > Exec=ssh-add -q ~/.ssh/id_rsa_some_key > does not work. > > (Just documenting this path issue somewhere) Just to be clear I was following instructions from Arch Wiki (for Kubuntu): https://wiki.archlinux.org/title/KDE_Wallet#:~:text=so%20auto_start%20force_run-,Using%20the%20KDE%20Wallet%20to%20store%20ssh%20key%20passphrases,-Note%3A%20An Which suggests the short path (~), I have not yet edited Arch Wiki instructions as I was hoping more experienced devs might have better recommendation.
As in I am running KDE Ubuntu 22.04, but, I was following instructions from Arch Wiki (my usual goto for Linux instructions/knowledge).
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kmenuedit/-/merge_requests/10
Systemd false/False: https://github.com/systemd/systemd/pull/24656 handling
Nice! With those two plus ~ expansion (ideally), I think we could call this fixed, and then Bug 455889 could be a further enhancement.
(In reply to nightBulb from comment #23) > Just to be clear I was following instructions from Arch Wiki (for Kubuntu): > > https://wiki.archlinux.org/title/KDE_Wallet#:~: > text=so%20auto_start%20force_run-, > Using%20the%20KDE%20Wallet%20to%20store%20ssh%20key%20passphrases,- > Note%3A%20An > > Which suggests the short path (~), I have not yet edited Arch Wiki > instructions as I was hoping more experienced devs might have better > recommendation. Seems like that should be edited to not recommend using a tilde in place of /home/[user], yeah.
Tilde expansion upstream https://github.com/systemd/systemd/pull/24658
Git commit 87c38a30fff27e3e9c0375f5c17d53ab0644ea0f by David Edmundson. Committed on 13/09/2022 at 13:56. Pushed by davidedmundson into branch 'master'. Split single command entry box into separate program and arguments. The desktop entry "Exec" states: "A command line consists of an executable program optionally followed by one or more arguments." By having a single entry "command" encourages users to write shell commands like "FOO=123 someApp" rather than a legal "/bin/env FOO=123 someApp". This patch adopts the pattern used in kdevelop/hotspot/tools where we explictly ask for executable and arguments. M +43 -22 basictab.cpp M +4 -2 basictab.h https://invent.kde.org/plasma/kmenuedit/commit/87c38a30fff27e3e9c0375f5c17d53ab0644ea0f
bool tolerance was merged too. Now we just need https://github.com/systemd/systemd/pull/24658 and this is effectively fixed.
...Oh and also changing the UI in the Properties window.
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kio/-/merge_requests/976
https://github.com/systemd/systemd/pull/24658 was merged. Now we're just waiting for https://invent.kde.org/frameworks/kio/-/merge_requests/976.
Git commit a85d3a5fe40c3d900067633d59a9a5b1e02e0eff by Nate Graham, on behalf of David Edmundson. Committed on 15/09/2022 at 19:01. Pushed by ngraham into branch 'master'. KPropertiesDialog: Split single command entry box into separate exec and args The desktop entry "Exec" states: "A command line consists of an executable program optionally followed by one or more arguments." By having a single entry "command" encourages users to write shell commands like "FOO=123 someApp" rather than a legal "/bin/env FOO=123 someApp". This happens to work for things launched by KIO but it is not universal and leads to breakages in cross desktop code. This patch adopts the pattern used in kdevelop/hotspot/tools where we explicitly ask for executable and arguments. M +25 -6 src/widgets/kpropertiesdesktopbase.ui M +23 -6 src/widgets/kpropertiesdialog.cpp https://invent.kde.org/frameworks/kio/commit/a85d3a5fe40c3d900067633d59a9a5b1e02e0eff
...aaaaand we're done!