Hello Greg, Greg Wooledge <g...@wooledge.org> writes:
> On Fri, May 06, 2022 at 02:30:59PM +0200, Giovanni Biscuolo wrote: [...] >> No , because in my ~/.xsessionrc (and only there) I have this variable: >> >> export XSESSION_WAS_HERE="Yes" >> >> and if I check that variable via "env | grep HERE" in an LXTerminal >> (or xterm, ot Mate terminal) started in LXDE I can see that variable is >> configured; this is why I'm pretty sure my ~/.xsessionrc is actually >> inherited by my Xsession > > OK. Then it sounds like something in between the Xsession and the shell > is indeed overwriting that XDG_DATA_DIRS variable. From what I see with my tests this is the most plausible explanation I can think of [...] > Remember, one of the tools available to you is looking at the initial > environment of a process, either by using ps with the "e" option, or > by reading the /proc/PID/environ file. Thank you for the suggestion, I was thinking about that but not found some time to test this before; this is what I see... --8<---------------cut here---------------start------------->8--- g@renaissance:~$ pstree -ps $$ systemd(1)---gdm3(6358)---gdm-session-wor(16849)---gdm-x-session(16859)---lxsession(16876)---lxpanel(17020)---lxterminal(17144)---bash(17147)---pstre+ --8<---------------cut here---------------end--------------->8--- environment of gdm3: --8<---------------cut here---------------start------------->8--- g@renaissance:~$ sudo sh -c "tr '\0' '\n' < /proc/6358/environ" LANG=en_US.UTF-8 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin INVOCATION_ID=6c9d0299ede348bea719251815d25952 JOURNAL_STREAM=8:23700 --8<---------------cut here---------------end--------------->8--- environment of gdm-session-wor: --8<---------------cut here---------------start------------->8--- g@renaissance:~$ sudo sh -c "tr '\0' '\n' < /proc/16849/environ" LANG=en_US.UTF-8 INVOCATION_ID=6c9d0299ede348bea719251815d25952 GDM_SESSION_DBUS_ADDRESS=unix:abstract=/tmp/dbus-yPP2BhYk PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin JOURNAL_STREAM=8:23700 --8<---------------cut here---------------end--------------->8--- environment of gdm-x-session: --8<---------------cut here---------------start------------->8--- g@renaissance:~$ sudo sh -c "tr '\0' '\n' < /proc/16859/environ" XDG_SEAT=seat0 LOGNAME=g USER=g USERNAME=g HOME=/home/g PWD=/home/g SHELL=/bin/bash PATH=/usr/local/bin:/usr/bin:/bin:/usr/games XDG_SESSION_TYPE=x11 XDG_VTNR=5 LANG=en_US.utf8 XDG_SESSION_ID=61 XDG_RUNTIME_DIR=/run/user/1000 DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus XDG_SESSION_CLASS=user GDM_LANG=en_US.utf8 GDMSESSION=LXDE DESKTOP_SESSION=LXDE XDG_SESSION_DESKTOP=LXDE --8<---------------cut here---------------end--------------->8--- environment of lxsession: --8<---------------cut here---------------start------------->8--- g@renaissance:~$ sudo sh -c "tr '\0' '\n' < /proc/16876/environ | grep XDG" XDG_SEAT=seat0 XDG_SESSION_TYPE=x11 XDG_SESSION_CLASS=user XDG_SESSION_ID=61 XDG_RUNTIME_DIR=/run/user/1000 XDG_MENU_PREFIX=lxde- XDG_CURRENT_DESKTOP=LXDE XDG_SESSION_DESKTOP=LXDE XDG_CONFIG_HOME=/home/g/.config XDG_DATA_HOME=/home/g/.local/share XDG_VTNR=5 XDG_CONFIG_DIRS=/home/g/.guix-profile/etc/xdg:/home/g/.guix-profile/etc/xdg:/home/g/.guix-profile/etc/xdg:/home/g/.guix-profile/etc/xdg:/etc/xdg:/home/g/.guix-profile/etc/xdg:/home/g/.guix-profile/etc/xdg XDG_DATA_DIRS=/usr/local/share/:/usr/share/:/usr/share/gdm/:/var/lib/menu-xdg/ --8<---------------cut here---------------end--------------->8--- environment of lxpanel: --8<---------------cut here---------------start------------->8--- g@renaissance:~$ sudo sh -c "tr '\0' '\n' < /proc/17020/environ | grep XDG" XDG_SEAT=seat0 XDG_SESSION_TYPE=x11 XDG_SESSION_CLASS=user XDG_SESSION_ID=61 XDG_RUNTIME_DIR=/run/user/1000 XDG_MENU_PREFIX=lxde- XDG_CURRENT_DESKTOP=LXDE XDG_SESSION_DESKTOP=LXDE XDG_CONFIG_HOME=/home/g/.config XDG_DATA_HOME=/home/g/.local/share XDG_VTNR=5 XDG_CONFIG_DIRS=/home/g/.guix-profile/etc/xdg:/home/g/.guix-profile/etc/xdg:/home/g/.guix-profile/etc/xdg:/home/g/.guix-profile/etc/xdg:/etc/xdg:/home/g/.guix-profile/etc/xdg:/home/g/.guix-profile/etc/xdg XDG_DATA_DIRS=/usr/local/share:/usr/share:/usr/share/gdm:/var/lib/menu-xdg:/usr/local/share/:/usr/share/:/usr/share/gdm/:/var/lib/menu-xdg/ --8<---------------cut here---------------end--------------->8--- environment of lxterminal: --8<---------------cut here---------------start------------->8--- g@renaissance:~$ sudo sh -c "tr '\0' '\n' < /proc/17144/environ | grep XDG" XDG_SEAT=seat0 XDG_SESSION_TYPE=x11 XDG_SESSION_CLASS=user XDG_SESSION_ID=61 XDG_RUNTIME_DIR=/run/user/1000 XDG_MENU_PREFIX=lxde- XDG_CURRENT_DESKTOP=LXDE XDG_SESSION_DESKTOP=LXDE XDG_CONFIG_HOME=/home/g/.config XDG_DATA_HOME=/home/g/.local/share XDG_VTNR=5 XDG_CONFIG_DIRS=/home/g/.guix-profile/etc/xdg:/home/g/.guix-profile/etc/xdg:/home/g/.guix-profile/etc/xdg:/home/g/.guix-profile/etc/xdg:/etc/xdg:/home/g/.guix-profile/etc/xdg:/home/g/.guix-profile/etc/xdg XDG_DATA_DIRS=/usr/local/share:/usr/share:/usr/share/gdm:/var/lib/menu-xdg:/usr/local/share/:/usr/share/:/usr/share/gdm/:/var/lib/menu-xdg/ --8<---------------cut here---------------end--------------->8--- So the XDG_DATA_DIRS is (re)setted between gdm-x-session and lxsession: I still have to find by what Still, it seems to me that ~/.xsession is correctly sourced by (or before) lxsession since other variables (e.g. XDG_CONFIG_DIRS) are configured accordingly ...still investigating Thanks! Gio' -- Giovanni Biscuolo Xelera IT Infrastructures
signature.asc
Description: PGP signature