startlxde overrides XDG_DATA_DIRS ignoring snap/flatpak .desktop entries

Bug #1905289 reported by lirel
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lxde-common (Debian)
Unknown
Unknown
lxde-common (Ubuntu)
New
Undecided
Unassigned

Bug Description

debian patches the script /usr/bin/startlxde to reset env variable XDG_DATA_DIRS to some preset directories. [1]

this bug
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=906288
can also be fixed when creating a new file

/etc/X11/Xsession.d/55debian-xdg-menus

containing
# set XDG_DATA_DIRS to include debian menu dirs

new_dirs="/usr/local/share:/usr/share:/usr/share/gdm/:/var/lib/menu-xdg/"

export XDG_DATA_DIRS
if [ -z "$XDG_DATA_DIRS" ]; then
    XDG_DATA_DIRS="${new_dirs}"
else
    XDG_DATA_DIRS="${XDG_DATA_DIRS}:${new_dirs}"
fi

and removing the patch
https://sources.debian.org/patches/lxde-common/0.99.2-3/03-menu-xdg.patch/

This would be more clean and match the behavior of snap as well as
/etc/X11/Xsession.d/20flatpak
thus rendering /usr/bin/lxsession or lxpanel able to find .desktop files placed beneath their respective XDG_DATA_DIRS paths.
Also icons are visible after this as well, that would be missing when just adding symlinks within
~/.local/share/applications .

This bug regards binary package openbox-lxde-session.

[1] https://sources.debian.org/patches/lxde-common/0.99.2-3/03-menu-xdg.patch/
[2] https://www.raspberrypi.org/forums/viewtopic.php?t=275001
[3] https://unix.stackexchange.com/questions/471327/whats-the-right-way-to-add-directories-to-xdg-data-dirs
[4] https://github.com/flatpak/ppa-flatpak/blob/ubuntu/bionic/profile/flatpak.sh a.k.a 20flatpak

Tags: desktop-file
Revision history for this message
lirel (m8r-lcodw5) wrote :
lirel (m8r-lcodw5)
description: updated
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.