snapd not setting XDG_DATA_DIRS correctly

Bug #1887442 reported by Hadmut Danisch
20
This bug affects 2 people
Affects Status Importance Assigned to Milestone
snapd (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Hi,

I'm just trying to figure out why Lubuntu does not offer snap-installed apps like Chromium-Browser in the desktop application launcher.

snapd is supposed to patch /var/lib/snapd/desktop into environment variable XDG_DATA_DIRS, which it doesn't do (at least under Lubuntu):

% echo $XDG_DATA_DIRS
/usr/share/Lubuntu:/usr/local/share/:/usr/share/:/usr/share

That's why snap-apps are not found.

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: snapd 2.45.1+20.04
ProcVersionSignature: Ubuntu 5.4.0-37.41-generic 5.4.41
Uname: Linux 5.4.0-37-generic x86_64
ApportVersion: 2.20.11-0ubuntu27.3
Architecture: amd64
CasperMD5CheckResult: skip
CurrentDesktop: LXQt
Date: Tue Jul 14 00:00:29 2020
InstallationDate: Installed on 2020-06-12 (31 days ago)
InstallationMedia: Lubuntu 20.04 LTS "Focal Fossa" - Release amd64 (20200423)
SourcePackage: snapd
UpgradeStatus: No upgrade log present (probably fresh install)
modified.conffile..etc.sudoers.d.99-snapd.conf: [inaccessible: [Errno 13] Permission denied: '/etc/sudoers.d/99-snapd.conf']

Revision history for this message
Hadmut Danisch (hadmut) wrote :
Revision history for this message
Olivier Tilloy (osomon) wrote :

From duplicate bug #1887227, there's a known bug in LXDE that overrides XDG_DATA_DIRS (https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=906288), however I'm not sure where the value "/usr/share/Lubuntu" comes from. This requires further investigation.

Revision history for this message
Hadmut Danisch (hadmut) wrote :

It seems to come from

/etc/X11/Xsession.d/60x11-common_xdg_path

which sets

DEFAULT_XDG_DATA_DIRS='/usr/local/share/:/usr/share/'

...

if [ "$DESKTOP_SESSION" != "gnome" ]; then
     if [ -z "$XDG_DATA_DIRS" ]; then
       XDG_DATA_DIRS="$DEFAULT_XDG_DATA_DIRS"
     fi
     if [ -n "${XDG_DATA_DIRS##*/usr/share/$DESKTOP_SESSION*}" ]; then
       XDG_DATA_DIRS=/usr/share/"$DESKTOP_SESSION":"$XDG_DATA_DIRS"
      fi
     export XDG_DATA_DIRS
  fi

where $DESKTOP_SESSION has the value Lubuntu

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in snapd (Ubuntu):
status: New → Confirmed
Revision history for this message
lirel (m8r-lcodw5) wrote :

flatpak copies this file https://github.com/flatpak/ppa-flatpak/blob/ubuntu/bionic/profile/flatpak.sh to /etc/X11/Xsession.d/20flatpack when installing.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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