1 |
Hi |
2 |
|
3 |
With KDE-4.2.2 entering tree hopefully on Monday, I would like to fix general |
4 |
XDG dirs related issues. |
5 |
|
6 |
(copied from bug https://bugs.gentoo.org/show_bug.cgi?id=264647 with some |
7 |
minor edits) : |
8 |
|
9 |
According to XDG data specification[1], applications should append default |
10 |
values for XDG_DATA_DIRS and XDG_CONFIG_DIRS only when those variables are not |
11 |
defined. Currently Gentoo does not define those variables in env.d at all. |
12 |
In typical scenario, when only one XDG-aware Desktop Environment is installed |
13 |
- everything works fine, as is such scenario, DE that follows specification. |
14 |
not having found XDG-dirs defined by system, appends default locations: |
15 |
|
16 |
XDG_DATA_DIRS="/usr/local/share:/usr/share" |
17 |
XDG_CONFIG_DIRS="/etc/xdg" |
18 |
|
19 |
Unfortunately, when some DE tries to insufficiently define XDG-dirs, let's |
20 |
say: |
21 |
|
22 |
XDG_DATA_DIRS="/usr/kde/4.2/share" |
23 |
|
24 |
it will most likely break every DE, resulting in default locations for desktop |
25 |
files being inaccessible (in menu - missing applications from /usr/local and |
26 |
/usr), because those default locations are not added implicitly. |
27 |
|
28 |
This is related to bug https://bugs.gentoo.org/show_bug.cgi?id=204310 |
29 |
|
30 |
The solution is to explicitly define standard XDG locations in env.d. |
31 |
Example layout: |
32 |
|
33 |
cat /etc/evn.d/01xdg-data-local |
34 |
XDG_DATA_DIRS="/usr/local/share" |
35 |
COLON_SEPARATED="XDG_DATA_DIRS XDG_CONFIG_DIRS" |
36 |
|
37 |
cat /etc/env.d/99xdg-data-base |
38 |
XDG_DATA_DIRS="/usr/share" |
39 |
XDG_CONFIG_DIRS="/etc/xdg" |
40 |
|
41 |
In such case, to properly define DE specific XDG locations, it would be just |
42 |
up to DE to specify: |
43 |
|
44 |
cat /etc/env.d/43kdepaths-4.2 |
45 |
[...] |
46 |
XDG_DATA_DIRS="/usr/kde/4.2/share" |
47 |
|
48 |
Currently kdelibs needs to explicitly append system-wide /usr/local/share and |
49 |
/usr/share to XDG_DATA_DIRS, which is considered workaround. |
50 |
|
51 |
Those env.d definitions would need to be either added to some existing xdg |
52 |
related ebuild (xdg-utils ?) or in new ebuild, that would be added to RDEPEND |
53 |
to any other XDG-aware DE. |
54 |
|
55 |
Comments? Ideas? If it fits, it would be nice to do it quickly (to not dwell |
56 |
in workarounds for too long). |
57 |
It doesn't seem to create any regression - it may at most create duplicate |
58 |
/usr/local/share and /usr/share XDG_DATA_DIRS entries for KDE users (as it |
59 |
seems to be the only DE that appends anything to XDG_DATA_DIRS). |
60 |
|
61 |
1. http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html |
62 |
|
63 |
-- |
64 |
regards |
65 |
MM |
66 |
|
67 |
---------------------------------------------------------------------- |
68 |
Kredyt z doplata, nawet 200 000 zl. Sprawdz! |
69 |
http://link.interia.pl/f20fc |