unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* LXDE startlxde is resetting XDG_DATA_DIRS on Debian 12! (was Re: customize Debian 11 evironment in lightdm...)
       [not found] <877d70c4cu.fsf@xelera.eu>
@ 2024-08-19 15:20 ` Giovanni Biscuolo
  0 siblings, 0 replies; only message in thread
From: Giovanni Biscuolo @ 2024-08-19 15:20 UTC (permalink / raw)
  To: debian-user; +Cc: help-guix

[-- Attachment #1: Type: text/plain, Size: 2810 bytes --]

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 <g@xelera.eu> 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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 849 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-08-19 15:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <877d70c4cu.fsf@xelera.eu>
2024-08-19 15:20 ` LXDE startlxde is resetting XDG_DATA_DIRS on Debian 12! (was Re: customize Debian 11 evironment in lightdm...) Giovanni Biscuolo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).