Bug 437336 - systemd-xdg-autostart-generator runs before $XDG_CONFIG_HOME/plasma-workspace/env files sourced
Summary: systemd-xdg-autostart-generator runs before $XDG_CONFIG_HOME/plasma-workspace...
Status: RESOLVED NOT A BUG
Alias: None
Product: plasmashell
Classification: Plasma
Component: general (other bugs)
Version First Reported In: 5.21.5
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: 1.0
Assignee: David Edmundson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-19 01:37 UTC by Matthew Cline
Modified: 2021-05-19 09:45 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Cline 2021-05-19 01:37:00 UTC
If I put a .desktop file in $XDG_CONFIG_HOME/autostart, set "Exec=xyz", and put an executable xyz file into $HOME/bin, then xyz doesn't start at login time, and the system journal shows errors systemd and autostart.  If I add a .conf file to $XDG_CONFIG_HOME/environment.d in order to add $HOME/bin to PATH then it works just fine, so evidently my file in $XDG_CONFIG_HOME/plasma-workspace/env which adds $HOME/bin to PATH hasn't been sourced yet by that point in time.

I'm using a Wayland session under Fedora 34.

Packages:
* plasma-workspace-5.21.5-3.fc34.x86_6systemd-248.3-1.fc34.x86_644
* systemd-248.3-1.fc34.x86_64
Comment 1 David Edmundson 2021-05-19 09:45:19 UTC
Yes. This is somewhat expected. 

Please move your setting of env variables earlier.

Alternatively as a workaround you can re-run the generator with 
`systemctl --user daemon-reload `