4 thoughts on “Review request: kdesrc-build login session script

  1. Jan Identicon Jan

    Why pollute $HOME with more dot-files? I really wish more people would honor $XDG_CONFIG_HOME and $XDG_DATA_HOME for stuff that needs to be hidden from users. The spec was created for a reason, you know.

  2. mpyne Identicon mpyne Post author

    Actually Jan I’m glad you mention that… one of the other things I had to implement was making sure kdesrc-build knows to search the XDG directories for the sample templates in addition to its own source directory to allow for this to work even with an “installed” kdesrc-build.

    There’s no way to avoid having to locate ~/.xsession where it is but I’m not completely opposed to moving the other two files (even if it is just moving pollution from one spot to the other… :P)

    The spec was created for a reason, you know.

    The nice thing about specs is that there are so many to choose from. But in all seriousness, the spec increases the fragility of a solution to this as now it relies on environment variables being properly set, and on the script using correct defaults if they’re not set. And although I’m aware of the issue, that doesn’t change the fact that it is yet another possible failure mode, which is something you have to consider when deciding whether to pick up and adopt a spec or not.

  3. Ralf Identicon Ralf

    In my setup, I am using .xsessionrc to set up the environment variables, and .xsession only contains the “exec startkde”. The problem with doing it all in .xsession is that this file will be executed when dbus, gpg-agent etc. are already running, so they may use the wrong folders for their settings, the pinentry-qt window will use the wrong Qt installation (it’s started by gpg-agent and inherits its environment), and maybe more.
    I got the documentation on this up-to-date a year ago or so, but someone moved it around in techbase so the links in the “Getting started” tutorials are broken now: http://techbase.kde.org/Archive:Getting_Started/Run/Full_Session

  4. Jan Identicon Jan

    It’s nice to hear that you’re adopting it. :)

    I have to disagree on the complexity though. The xdg spec is one of the simplest specs on freedesktop.org imho. In shell syntax it’s nothing more than doing
    XDG_CONFIG_HOME=”${XDG_CONFIG_HOME:-$HOME./config}”
    XDG_DATA_DIRS=”${XDG_DATA_DIRS:$HOME/.local/share}”
    to make sure those two are read and set properly. And if you already have code that reads stuff from several paths, it should only be a matter of appending the proper var onto it.

    And yeah, I know that it’s too late for .xsession.

Comments are closed.