sddm icon indicating copy to clipboard operation
sddm copied to clipboard

Support the XDG Base Directory Specification

Open ruro opened this issue 4 years ago • 4 comments

I think that sddm should support the XDG Base Directory Specification. In particular, the default Xsession script should also source configuration files from ${XDG_CONFIG_HOME} in addition to the home directory.

I propose adding the following to the default Xsession script:

XDGXSESSION=${XDG_CONFIG_HOME:-$HOME/.config}/xsession

if [ -f "$XDGXSESSION" ]; then
  . "$XDGXSESSION"
fi

ruro avatar Mar 10 '22 23:03 ruro

What is the benefit of sourcing files from that dir, when you are starting sddm x11 in root or rootless mode ? Feel free to prepare PR.

tpgxyz avatar Mar 23 '22 13:03 tpgxyz

I am not sure, what do you mean by "root or rootless mode", I was under the impression, that the Xsession script is ran as the "current" user, that is attempting to log in. Am I mistaken?

The benefit of following the XDG Base Directory specification is that it helps people declutter their home directories and better organize their config files.

I use pam_env to set up my environment variables, so my XDG_CONFIG_HOME is already set immediately after starting a login shell. I checked, and the environment variables are already set when the sddm/scripts/Xsession script is ran. Alternatively, you don't even need to set any environment variables if your XDG_CONFIG_HOME is the default ~/.config folder.

I'm a bit busy right now, so I don't have the time to make a PR right now, but I am willing to do it once I have some free time.

ruro avatar Mar 23 '22 18:03 ruro

See also: https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1651

bam80 avatar Apr 25 '22 19:04 bam80

And #1543

bam80 avatar Apr 28 '22 12:04 bam80