Hello,
I'm trying to customize my user environment when using the lightdm
display manager (then the LXDE desktop environment)
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 and XDG_CONFIG_DIRS
I set up configuration files according to this "Quick Guide" chapter in
the "Environment Variables" wiki page:
https://wiki.debian.org/EnvironmentVariables#Quick_guide
This is my ~/.profile:
--8<---------------cut here---------------start------------->8---
### Guix settings
#
# add Guix current path
export PATH="$HOME/.config/guix/current/bin${PATH:+:}$PATH"
# Locale path
export GUIX_LOCPATH="$HOME/.guix-profile/lib/locale"
# add Guix infopath
export INFOPATH="$HOME/.config/guix/current/share/info:$INFOPATH"
# set default Guix profile
export GUIX_PROFILE="$HOME/.guix-profile"
# source default Guix profile
. $GUIX_PROFILE/etc/profile
--8<---------------cut here---------------end--------------->8---
and this is my ~/.xsessionrc:
--8<---------------cut here---------------start------------->8---
if [ -f ~/.profile ]; then
. ~/.profile
fi
export XSESSION_WAS_HERE="Yes"
--8<---------------cut here---------------end--------------->8---
When I log in via lightdm to an LXDE session, I open LXterminal to check
my environment and I find:
--8<---------------cut here---------------start------------->8---
patrizia@raifort:~$ env | grep XDG
XDG_CONFIG_DIRS=/etc/xdg
XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0
XDG_MENU_PREFIX=lxde-
XDG_DATA_HOME=/home/patrizia/.local/share
XDG_CONFIG_HOME=/home/patrizia/.config
XDG_SEAT=seat0
XDG_SESSION_DESKTOP=lightdm-xsession
XDG_SESSION_TYPE=x11
XDG_GREETER_DATA_DIR=/var/lib/lightdm/data/patrizia
XDG_CURRENT_DESKTOP=LXDE
XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
XDG_SESSION_CLASS=user
XDG_VTNR=7
XDG_SESSION_ID=2
XDG_RUNTIME_DIR=/run/user/1001
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/
patrizia@raifort:~$ systemctl --user show-environment | grep XDG
XDG_RUNTIME_DIR=/run/user/1001
XDG_DATA_DIRS=/home/patrizia/.guix-profile/share
XDG_GREETER_DATA_DIR=/var/lib/lightdm/data/patrizia
XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
XDG_SESSION_CLASS=user
XDG_SESSION_DESKTOP=lightdm-xsession
XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0
XDG_SESSION_TYPE=x11
--8<---------------cut here---------------end--------------->8---
As shown above, the "env" result and the "systemctl --user
show-environment" are slightly different, in particular I'm missing
XDG_DATA_DIRS as configured in my ~/.profile
If in the LXTerminal I start a login bash shell with "bash -l" I get:
--8<---------------cut here---------------start------------->8---
patrizia@raifort:~$ env | grep XDG
XDG_CONFIG_DIRS=/etc/xdg
XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0
XDG_MENU_PREFIX=lxde-
XDG_DATA_HOME=/home/patrizia/.local/share
XDG_CONFIG_HOME=/home/patrizia/.config
XDG_SEAT=seat0
XDG_SESSION_DESKTOP=lightdm-xsession
XDG_SESSION_TYPE=x11
XDG_GREETER_DATA_DIR=/var/lib/lightdm/data/patrizia
XDG_CURRENT_DESKTOP=LXDE
XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
XDG_SESSION_CLASS=user
XDG_VTNR=7
XDG_SESSION_ID=2
XDG_RUNTIME_DIR=/run/user/1001
XDG_DATA_DIRS=/home/patrizia/.guix-profile/share:/home/patrizia/.guix-profile/share:/home/patrizia/.guix-profile/share:/usr/local/share:/usr/share:/usr/share/gdm:/var/lib/menu-xdg:/usr/local/share/:/usr/share/:/usr/share/gdm/:/var/lib/menu-xdg/
patrizia@raifort:~$ systemctl --user show-environment | grep XDG
XDG_RUNTIME_DIR=/run/user/1001
XDG_DATA_DIRS=/home/patrizia/.guix-profile/share
XDG_GREETER_DATA_DIR=/var/lib/lightdm/data/patrizia
XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
XDG_SESSION_CLASS=user
XDG_SESSION_DESKTOP=lightdm-xsession
XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0
XDG_SESSION_TYPE=x11
--8<---------------cut here---------------end--------------->8---
Now the XDG_DATA_DIRS is fine.
The problem is that the lightdm (and LXDE) XDG_DATA_DIRS is missing
"/home/patrizia/.guix-profile/share" and this is the reason why
applications installed with Guix are not listed in my menu.
I searched extensively on the web how to fix this issue but I was not
able to find the cause and related "workaround".
I see that similar problems are described in this bugs:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=927907
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=931776
Please is there a way to fix my problem?
Is there a way to customize my environment in a standard way that works
with all display managers and desktop environments?
Thank you for your help!
Happy hacking, Gio'
--
Giovanni Biscuolo
Xelera IT Infrastructures
Attachment:
signature.asc
Description: PGP signature