You are not logged in.

#1 2022-07-30 05:07:09

jerryDaBaaws
Member
Registered: 2020-06-08
Posts: 115

XDG system directories are not set [SOLVED]

Did a fresh install of Arch, think it was alright on first boot, but after rebooting a few times and running some programs, I was getting the errors that system schema is not set,
which turns out to be that both   $XDG_CONFIG_DIRS and $XDG_DATA_DIRS are unset at boot.
I've to manually export them in my .zprofile to make them work to their default values per this https://wiki.archlinux.org/title/XDG_Base_Directory

any idea on why this is happening ?

Last edited by jerryDaBaaws (2022-07-30 12:27:51)

Offline

#2 2022-07-30 07:49:01

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,514

Re: XDG system directories are not set [SOLVED]

any idea on why this is happening ?

Not without you specifying

running some programs, I was getting the errors that system schema is not set

$XDG_CONFIG_DIRS and $XDG_DATA_DIRS are frequently empty and therefore their resolution should™ be their default paths
So unless you're using some custom paths, that's arguebly a bug in whatever "some program" is - though the spec uses my most favorite term…

Online

#3 2022-07-30 11:12:09

koffeinfriedhof
Member
Registered: 2017-11-30
Posts: 91

Re: XDG system directories are not set [SOLVED]

That is not a bug. freedesktop itself defines an empty var means the default path, e.g. `${XDG_CONFIG_HOME:-~/.config}`  in shell scripts. See freedesktop specification.
But those are not mandatory, so perhaps your application just does not respect these defaults.

Offline

#4 2022-07-30 12:27:13

jerryDaBaaws
Member
Registered: 2020-06-08
Posts: 115

Re: XDG system directories are not set [SOLVED]

thanks, it never happened before, so thought it might be some bug. have set it manually in .zprofile to its default value

Offline

#5 2022-07-30 13:52:37

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,514

Re: XDG system directories are not set [SOLVED]

Again: you should™ not have to set those values and doing so might cause issues further down the road (eg. if some other process wants to use a different default unless a path has been specifically set or whatnot)
=> You would ideally raise a bug for "some programs" and otherwise ideally contain this mitigation by setting the paths in some wrapper script, not globally in your zprofile (which will also not apply to eg. GUI shells)

Online

Board footer

Powered by FluxBB