[arch-general] XDG variables no longer set
For some reason, after my last reboot (a kernel update), none of the XDG variables[1] (such as $XDG_CONFIG_HOME) are being set, which broke a lot of my configuration, as I rely on those in scripts. I was able to fix it by writing a script[2] to drop in /etc/profile.d/ that would create those directories and export the variables as required, but what I want to know is why they broke in the first place. Has anyone else experienced this? Robbie [1] http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html#varia... [2] Like this (taken from /etc/xdg/xfce4/xinitrc) : #!/bin/sh # $XDG_CONFIG_HOME defines the base directory relative to which # user specific configuration files should be stored. If # $XDG_CONFIG_HOME is either not set or empty, a default equal to # $HOME/.config should be used. if test "x$XDG_CONFIG_HOME" = "x" ; then XDG_CONFIG_HOME=$HOME/.config export XDG_CONFIG_HOME fi [ -d "$XDG_CONFIG_HOME" ] || mkdir "$XDG_CONFIG_HOME"
On Tue, Feb 26, 2013 at 6:42 AM, Robbie Smith <zoqaeski@gmail.com> wrote:
For some reason, after my last reboot (a kernel update), none of the XDG variables[1] (such as $XDG_CONFIG_HOME) are being set, which broke a lot of my configuration, as I rely on those in scripts.
I was able to fix it by writing a script[2] to drop in /etc/profile.d/ that would create those directories and export the variables as required, but what I want to know is why they broke in the first place.
Has anyone else experienced this?
Robbie
[1] http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html#varia...
[2] Like this (taken from /etc/xdg/xfce4/xinitrc) : #!/bin/sh # $XDG_CONFIG_HOME defines the base directory relative to which # user specific configuration files should be stored. If # $XDG_CONFIG_HOME is either not set or empty, a default equal to # $HOME/.config should be used. if test "x$XDG_CONFIG_HOME" = "x" ; then XDG_CONFIG_HOME=$HOME/.config export XDG_CONFIG_HOME fi [ -d "$XDG_CONFIG_HOME" ] || mkdir "$XDG_CONFIG_HOME"
You can only expect these to be set if the default has been changed. If they're unset, it means anything querying them should fall back to ~/.config (and the other fallbacks).
On 26/02/13 22:44, Daniel Micay wrote:
On Tue, Feb 26, 2013 at 6:42 AM, Robbie Smith <zoqaeski@gmail.com> wrote:
For some reason, after my last reboot (a kernel update), none of the XDG variables[1] (such as $XDG_CONFIG_HOME) are being set, which broke a lot of my configuration, as I rely on those in scripts.
I was able to fix it by writing a script[2] to drop in /etc/profile.d/ that would create those directories and export the variables as required, but what I want to know is why they broke in the first place.
Has anyone else experienced this?
Robbie
[1] http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html#varia...
[2] Like this (taken from /etc/xdg/xfce4/xinitrc) : #!/bin/sh # $XDG_CONFIG_HOME defines the base directory relative to which # user specific configuration files should be stored. If # $XDG_CONFIG_HOME is either not set or empty, a default equal to # $HOME/.config should be used. if test "x$XDG_CONFIG_HOME" = "x" ; then XDG_CONFIG_HOME=$HOME/.config export XDG_CONFIG_HOME fi [ -d "$XDG_CONFIG_HOME" ] || mkdir "$XDG_CONFIG_HOME"
You can only expect these to be set if the default has been changed. If they're unset, it means anything querying them should fall back to ~/.config (and the other fallbacks).
They didn’t exist at all. I had to manually export them or they didn’t exist at login, which is why I wrote that script.
On Tue, Feb 26, 2013 at 6:57 AM, Robbie Smith <zoqaeski@gmail.com> wrote:
On 26/02/13 22:44, Daniel Micay wrote:
On Tue, Feb 26, 2013 at 6:42 AM, Robbie Smith <zoqaeski@gmail.com> wrote:
For some reason, after my last reboot (a kernel update), none of the XDG variables[1] (such as $XDG_CONFIG_HOME) are being set, which broke a lot of my configuration, as I rely on those in scripts.
I was able to fix it by writing a script[2] to drop in /etc/profile.d/ that would create those directories and export the variables as required, but what I want to know is why they broke in the first place.
Has anyone else experienced this?
Robbie
[1]
http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html#varia...
[2] Like this (taken from /etc/xdg/xfce4/xinitrc) : #!/bin/sh # $XDG_CONFIG_HOME defines the base directory relative to which # user specific configuration files should be stored. If # $XDG_CONFIG_HOME is either not set or empty, a default equal to # $HOME/.config should be used. if test "x$XDG_CONFIG_HOME" = "x" ; then XDG_CONFIG_HOME=$HOME/.config export XDG_CONFIG_HOME fi [ -d "$XDG_CONFIG_HOME" ] || mkdir "$XDG_CONFIG_HOME"
You can only expect these to be set if the default has been changed. If they're unset, it means anything querying them should fall back to ~/.config (and the other fallbacks).
They didn’t exist at all. I had to manually export them or they didn’t exist at login, which is why I wrote that script.
Yes, that's correct. They aren't supposed to be set by default (it was a bug that they were). Your scripts/applications that use those variables should be checking for their existence and falling back to a default unless you're sure that you're setting them manually yourself.
On Tue, Feb 26, 2013 at 6:42 AM, Robbie Smith <zoqaeski@gmail.com> wrote:
For some reason, after my last reboot (a kernel update), none of the XDG variables[1] (such as $XDG_CONFIG_HOME) are being set, which broke a lot of my configuration, as I rely on those in scripts.
I was able to fix it by writing a script[2] to drop in /etc/profile.d/ that would create those directories and export the variables as required, but what I want to know is why they broke in the first place.
Has anyone else experienced this?
Robbie
These were removed recently. You might want to leave a comment on the bug report: https://bugs.archlinux.org/task/31204
On Tue, 26 Feb 2013 22:42:32 +1100 Robbie Smith <zoqaeski@gmail.com> wrote:
For some reason, after my last reboot (a kernel update), none of the XDG variables[1] (such as $XDG_CONFIG_HOME) are being set, which broke a lot of my configuration, as I rely on those in scripts.
Are there any packaged applications broken, or only your scripts?
I was able to fix it by writing a script[2] to drop in /etc/profile.d/ that would create those directories and export the variables as required, but what I want to know is why they broke in the first place.
libx11 no longer ships the XDG_CONFIG_* variables. Also, notice that xfce4 by itself does not need XDG_CONFIG_* to be set.
Has anyone else experienced this?
Robbie
[1] http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html#varia...
[2] Like this (taken from /etc/xdg/xfce4/xinitrc) : #!/bin/sh # $XDG_CONFIG_HOME defines the base directory relative to which # user specific configuration files should be stored. If # $XDG_CONFIG_HOME is either not set or empty, a default equal to # $HOME/.config should be used. if test "x$XDG_CONFIG_HOME" = "x" ; then XDG_CONFIG_HOME=$HOME/.config export XDG_CONFIG_HOME fi [ -d "$XDG_CONFIG_HOME" ] || mkdir "$XDG_CONFIG_HOME"
-- Leonid Isaev GnuPG key: 0x164B5A6D Fingerprint: C0DF 20D0 C075 C3F1 E1BE 775A A7AE F6CB 164B 5A6D
participants (4)
-
Daniel Micay
-
Eric Bélanger
-
Leonid Isaev
-
Robbie Smith