Hello,
I'm following up a very old thread on debian-user (May 2022) since I
finally understand what is _resetting_ my XDG_DATA_DIRS... oh my!!!
To help-guix:
Giovanni Biscuolo <
[email protected]> writes:
I'm trying to customize my user environment when using the lightdm
display manager (then the LXDE desktop environment)
after the first tests, I also used gdm3 with the very same results
I need to customize some variables so I can see Guix installed
applications in my desktop menu, in particular I need to customize XDG_DATA_DIRS
...but "something" in LXDE (and only in LXDE) was _resetting_ my
XDG_DATA_DIRS customization
[...]
Since then, I upgraded to Debian 12 (bookworm) and the issue is still
here.
Since then, I changed the way I'm customizing user's environment in
order to allow users to use Guix installed programs (via PATH
customization) and see them in the "Application menu" of their preferred desktop environment (via XDG_DATA_DIRS customization).
The fact is that my environment setup - that now is the same provided my
the Guix binary install script [1] coupled with a per-user .xsessionrc
sourcing the relevant environment variables scripts [2] - IS WORKING
with all desktop environments I tested... except LXDE.
OK, so after this short recap to provide some context, this is the
head of the /usr/bin/startlxde script that starts an lxsession [3]:
--8<---------------cut here---------------start------------->8---
#!/bin/sh
export XDG_DATA_DIRS="/usr/local/share/:/usr/share/:/usr/share/gdm/:/var/lib/menu-xdg/"
if [ -z "$XDG_CONFIG_HOME" ]; then
export XDG_CONFIG_HOME="$HOME/.config"
fi
if [ -z "$XDG_DATA_HOME" ]; then
export XDG_DATA_HOME="$HOME/.local/share"
fi
--8<---------------cut here---------------end--------------->8---
That is literally _resetting_ all previous XDG_DATA_DIRS variable
content... why?!?!?
AFAIU this should be a bug in /usr/bin/startlxde.
Actually a Debian bug for this issue in package openbox-lxde-session
(that provides /usr/bin/startlxde) has been already filed on 2018-08-16,
so I'm not going to duplicate it:
«openbox-lxde-session: /usr/bin/startlxde overrides XDG_DATA_DIRS making
all local .desktop files unable to show on menu»
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=906288
That's it! :-(
Happy hacking! Gio'
[1]
https://git.savannah.gnu.org/cgit/guix.git/plain/etc/guix-install.sh
[2] this way:
if [ -d /etc/profile.d ]; then
for i in /etc/profile.d/*.sh; do
if [ -r $i ]; then
. $i
fi
done
unset i
fi
[3] as found in /usr/share/xsessions/LXDE.desktop defining how to start
LXDE desktop session (Exec=/usr/bin/startlxde).
--
Giovanni Biscuolo
Xelera IT Infrastructures
--=-=-Content-Type: application/pgp-signature; name="signature.asc"
-----BEGIN PGP SIGNATURE-----
iQJABAEBCgAqFiEERcxjuFJYydVfNLI5030Op87MORIFAmbDYrkMHGdAeGVsZXJh LmV1AAoJENN9DqfOzDkSb1YQAJkKtOXelnhh91+5V4WGN3xDxVqRPWb4yyx7K2pp 08dbyXcH24njz2+Dx62q+9QhNmb9Yc8lEH1oRSC+P2dFyC1OVTbXdDoHv+NACFUU Rz48HMam1l1eaFK0GldSn1xOnIhB/DofVQMVHYscrRO+YzmOjRMAtuS563NGvHaR Ci1Ur6Gu+sWIJP0VZk1XPbrdEkOEU/7fu4WDdyXRr5p4pzDXzWUsYHonTXv5AU1o OomZZy2tpZ6xZTaz/FxI1wR1tAnSorrvtKzvCzab/IMHaEfdkBiF3Uuwajnh/Are qpgeQhFa5uc/oaHrsYYM2hISJndObV8tA7up2ihqFm07aUPqWLOR6QcggwvV//aN VlHKSZiHTccQlGXnWg9p6YeP364Q0LHex6TAKvAsrH+sOtrF8fMsC928w5U0R9Sg PW0agJbHImj/tV8gGRRIeNrRobfM8vRQHlwj+2XPyBZ0I6RJynx1Z/BEHrWR+jZJ jpRr1neKRUt0+aJhyLQSYBKyYk9fjtry4k+PKwzKBInvV7asuqRqyYJZgX9cpqxh jpSnr93utVudLZBHJh0MlP9lyT1vjqmAvyAv7ToLYIhPUb1izZ3DLAcnKR1mxUUg JP0CuDOAhf/SmhkY/f+Q7ND/Hz+8GsRECVk3G03K3h19CYtcTM77qnntytieTxSE
yKQM
=4JZo
-----END PGP SIGNATURE-----
--- SoupGate-Win32 v1.05
*