You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.
Is your feature request related to a problem? Please describe
The environment provided for xdg-autostart-generator is insufficient.
For example, xdg-autostart-generator cannot use autostart files in non-default locations, because XDG_CONFIG_DIRS/XDG_DATA_DIRS is not provided (however, it already able to do that because xdg_user_dirs() in src/basic/path-lookup.c can use the XDG_* variables).
This problem is exacerbated by the fact that it is difficult to use environment generators to provide these variables, because they are usually set by some startup scripts/executables (one for each installed DE), which usually call org.freedesktop.systemd1.Manager.UnsetAndSetEnvironment and Reload for that.
Describe the solution you'd like
It would be great if generators running on user will be able to access client's XDG_* environment variables (and maybe PATH so that xdg-autostart-generator can support Exec= in non-default locations).
The change required for this can look like so (somewhere in src/core/manager.c in build_generator_environment(), or maybe better somewhere before running environment generators):
if (MANAGER_IS_USER(m)) {
STRV_FOREACH(env, m->client_environment)
if (startswith(*env, "XDG_"))
strv_env_replace_strdup(ge, *env);
}
Describe alternatives you've considered
Alternative appoach is to provide some mechanism to pass the specified environment variables from m->client_environment to specific generator (but I have no idea how to implement this).
The systemd version you checked that didn't have the feature you are asking for
No response
The text was updated successfully, but these errors were encountered:
Component
systemd-xdg-autostart-generator
Is your feature request related to a problem? Please describe
The environment provided for xdg-autostart-generator is insufficient.
For example, xdg-autostart-generator cannot use autostart files in non-default locations, because
XDG_CONFIG_DIRS/XDG_DATA_DIRSis not provided (however, it already able to do that becausexdg_user_dirs()insrc/basic/path-lookup.ccan use the XDG_* variables).This problem is exacerbated by the fact that it is difficult to use environment generators to provide these variables, because they are usually set by some startup scripts/executables (one for each installed DE), which usually call
org.freedesktop.systemd1.Manager.UnsetAndSetEnvironmentandReloadfor that.Describe the solution you'd like
It would be great if generators running on user will be able to access client's XDG_* environment variables (and maybe
PATHso that xdg-autostart-generator can supportExec=in non-default locations).The change required for this can look like so (somewhere in
src/core/manager.cinbuild_generator_environment(), or maybe better somewhere before running environment generators):Describe alternatives you've considered
Alternative appoach is to provide some mechanism to pass the specified environment variables from
m->client_environmentto specific generator (but I have no idea how to implement this).The systemd version you checked that didn't have the feature you are asking for
No response
The text was updated successfully, but these errors were encountered: