-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
xdg-autostart-generator: unconditionally ignores items with X-GNOME-Autostart-Phase #18791
Comments
Hmm, we would need to move the evaluation of such logic into an ExecCondition= then (or possibly generate multiple files with ConditionEnvironment=). But, I think the proper thing to do here is to create a new systemd service. This should be pulled in by CC: @davidedmundson |
We could even run it when the systemd user instance starts. However, I suspect that might cause issues if the user's language has not been properly exported to the environment yet. |
@rdieter can you tell us which .desktop files you encountered with? In KDE we had an X-KDE-autostart-phase= It was only used by a few core critical processes, our stance was that if it's so important that it needs custom startup positioning it needs to have a custom service file where we can express the exact wants/before/afters. Therefore it was safe to just ignore in the generator. |
FWIW, on Arch xdg-user-dirs does have a systemd service for xdg-user-dirs-update and no .desktop file [1] |
The most important and noticeable one was xdg-user-dirs. I've found some others: |
I have xdg-user-dirs and fcitx-autostart. The latter one not starting is pretty annoying. |
So, for |
I think the approach is correct in principle. However, we need to move it to hook into The reason is that the xdg-user-dirs requires the locale to be set correctly. However, that may only happen during desktop startup by reading a desktop specific settings key. As such, we must run this only after the graphical session has began startup. |
|
Alll I know is that this exists, but I don't know it's purpose exactly: $ cat /etc/xdg/autostart/spice-vdagent.desktop |
This is also causing KDE bug 439346 "baloo_file doesn't start when desktop plasma starts" in Fedora 34. I commented out both
|
But if there is The proper fix is likely to find the reason that |
Yes, I think adding |
Yes, it does. Please see |
I have also been bit by this issue. I'm using openSUSE Tumbleweed and KDE and had the systemd startup enabled. Then I installed IBus and wondered, why the service wouldn't show up, let alone the daemon start up. On another device it works fine. I found that the main difference was that one device used KDE's systemd start process. So even if the fix takes some more time, please at least raise the log level of the corresponding output. I understand that files that don't conform to the XDG standard can be debug messages - systemd is not meant to be a .desktop file verifier. (Lines
But when systemd unconditionally skips these perfectly valid files, even though GNOME is not even used, the log level should be something like log_warning and not a debug message that needs to be enabled first by the end user.
|
I still think that we just need to go through the migration pain here. We can provide some compatibility, but certain services just need to be migrated to systemd proper for their integration to work (this is really simple, the main issue is knowing what is affected and chasing down people to fix it …). Is there an upstream issue for ibus already? If yes, could you point me to it, if no, could you maybe open one and paste the link? |
I'm not sure what the point of the script is, as it exits on GNOME and shouldn't really be needed either way as long as the Edit: Apparently the service file isn't enough, probably the dbus service never gets called unless the DE integration has been started by ibus itself, kind of a chicken and egg situation. The autostart |
I added a systemd service for xdg-users-update https://gitlab.freedesktop.org/xdg/xdg-user-dirs/-/merge_requests/10 |
Recently GNOME and Plasma have been embracing systemd for handling their session startup. To enable autostart integration with this systemd includes systemd-xdg-autostart-generator which creates units from autostart desktop files. xdg-user-dirs installs such a desktop file (xdg-user-dirs.desktop). However because this file contains X-GNOME-Autostart-Phase=Initialization systemd will skip it since it assumes it will be handles by GNOME itself. This a problem for Plasma and other desktop environments that do not handle this themselves, assuming that systemd takes care about autostart xdg-user-dirs-update will not be run. See systemd/systemd#18791 We can provide a systemd service file to make sure xdg-user-dirs-update is run during session startup. This ensures that the relevant directories of the user exist on login and during startup as specifying to be run before graphical-session-pre.target means that it runs sufficiently early in the startup process while using the generator would result in 'After=graphical-session.target'.
I'm still being bitten by this bug in Nov 2022. spice-vdagent fails to start in KDE due to the presence of the line |
I can add another distribution to the list, Manjaro is affected by this too @chewblacka did you find an "upstream" tracker for this? |
they now ship one upstream |
Will this ever be fixed? KDE Plasma on Debian is affected too. |
per
systemd/src/xdg-autostart-generator/xdg-autostart-service.c
Line 558 in c0267a5
xdg-autostart-generator ignores all autostart items with the key
X-GNOME-Autostart-Phase
and now that kde plasma supports systemd user sessions, we noticed that several autostart items are not running. One of them was xdg-user-dirs since it contains
X-GNOME-Autostart-Phase=Initialization
I'd argue that xdg-autostart-generator should not do this unconditionally, and take more care to do it only where it makes sense.
The text was updated successfully, but these errors were encountered: