Bug 366180 - Environment variable XDG_DATA_DIRS may be incorrect?
Summary: Environment variable XDG_DATA_DIRS may be incorrect?
Status: RESOLVED UPSTREAM
Alias: None
Product: neon
Classification: KDE Neon
Component: Live/Install images (show other bugs)
Version: unspecified
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: Neon Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-27 19:51 UTC by romuluspb
Modified: 2017-07-31 22:31 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description romuluspb 2016-07-27 19:51:58 UTC
I'm getting this from bash: 

echo $XDG_DATA_DIRS                                                                                                                                                    
/usr/share//usr/share/xsessions/plasma:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop 

I believe there is a ':' missing?

Reproducible: Always

Steps to Reproduce:
1. A program that pointed me to investigate XDG_DATA_DIRS was Nylas e-mail client. it fails to get system tray icon at the moment. But I'm not sure it's because of this...
2. after installation, add any mail account and be sure to enable system tray icon on preferences, if something did not show on system tray.

Actual Results:  
missing icon for system tray, fall to default "no icon". It may be affecting the software Icon too as it differs, the panel from the one on app windows.

Expected Results:  
Nylas Icon on sys. tray.
Comment 1 Harald Sitter 2016-07-29 09:06:15 UTC
> DESKTOP_SESSION=/usr/share/xsessions/plasma

which will be prepended to the variable by a core x11 setup script

> $ grep -r SESSION\": /etc/X11/Xsession.d/60x11-common_xdg_path
>   XDG_CONFIG_DIRS="$DEFAULT_XDG_CONFIG_DIRS"/xdg-"$DESKTOP_SESSION":"$XDG_CONFIG_DIRS"
>      XDG_DATA_DIRS=/usr/share/"$DESKTOP_SESSION":"$XDG_DATA_DIRS"

So I am guessing that every DM other than SDDM actually treats DESKTOP_SESSION as the basename (excluding suffix) of the xsession file name.  Please forward this bug to SDDM on github.

As for your actual problem of icons not working. This probably has nothing to do with it since 
/usr/share//usr/share/xsessions/plasma
==
/usr/share/usr/share/xsessions/plasma
which is a valid path, and the XDG spec doesn't mandate that the paths in the variable exist at all, so even though it is malformed it shouldn't matter. That said, depending on how Nylas renders the systray icons and whether it has own icon lookup code involved it is entirely possible that the lookup code is incorrect and breaks on non-existant paths in XDG_DATA_DIRS. I suggest you file a bug report with the Nylas authors as they are probably in a better position to guess where the problem might be.
Comment 2 Adrien Beau 2017-07-31 22:31:28 UTC
I encountered this bug, and did some investigation.

* The core X11 setup script (60x11-common_xdg_path) was created by Ubuntu:
  https://bugs.launchpad.net/ubuntu/+source/xorg/+bug/804734

* There is a recent bug report about this very issue on Launchpad:
  https://bugs.launchpad.net/ubuntu/+source/xorg/+bug/1668722

I have filed a bug with SDDM on Github:
https://github.com/sddm/sddm/issues/852

I feel Ubuntu could improve its script, too. Anyway, this is all outside of the scope of Neon.