xdg-autostart-service: handle gnome autostart phase better on other d…#26379
Merged
YHNdnzj merged 1 commit intosystemd:mainfrom Apr 28, 2023
Merged
Conversation
Contributor
Author
|
We had successfully released a new major release. We are no longer in a development freeze phase. |
d0b1243 to
3f66da5
Compare
YHNdnzj
reviewed
Feb 9, 2023
poettering
reviewed
Feb 22, 2023
Member
|
ping? |
Member
|
I'll rebase the patch. |
…esktops Autostart files which contain the line gnome-autostart-phase are currently completely skipped by systemd. This is because these are handled internally by gnome startup through other means. The problem is a number of desktop files that need to run on KDE too have this flag set. Ideally they should just create systemd user units, but we're not at this point universally yet. This patch changes the logic so if the flag is set, we set NotShowIn-gnome, which in turn would just not load decided at runtime. As an optimisation if we would get conflicting OnlyShowIn lines we still skip the file completely. Example: $ rg 'Exec|Autostart-Phase' /etc/xdg/autostart/gnome-keyring-pkcs11.desktop Exec=/usr/bin/gnome-keyring-daemon --start --components=pkcs11 X-GNOME-Autostart-Phase=PreDisplayServer $ cat '/tmp/xxx/app-gnome\x2dkeyring\x2dpkcs11@autostart.service' # Automatically generated by systemd-xdg-autostart-generator [Unit] SourcePath=/etc/xdg/autostart/gnome-keyring-pkcs11.desktop ... [Service] ... ExecCondition=/usr/lib/systemd/systemd-xdg-autostart-condition "Unity:MATE" "GNOME" Co-authored-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
3f66da5 to
03e19a7
Compare
Member
|
Updated with the requested changes and some trivial cleanups. |
YHNdnzj
approved these changes
Apr 27, 2023
Contributor
|
Thanks everyone! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Autostart files which contain the line gnome-autostart-phase are currently completely skipped by systemd. This is because these are handled internally by gnome startup through other means.
The problem is a number of desktop files that need to run on kde too have this flag set. Ideally they should just create systemd user units, but we're not at this point universally yet.
This patch changes the logic so if the flag is set, we set NotShowIn-gnome, which in turn would just not load decided at runtime.
As an optimisation if we would get conflicting OnlyShowIn lines we still skip the file completely.