Version 2.0.5 of snapd in -proposed has a fix for this script. See https://bugs.launchpad.net/bugs/1575014 for details and even more problems seemingly unrelated to snapd, but caused by its broken $XDG_DATA_DIRS handling.
It's actually perfectly fine to not have the variable set at all if only the default paths should be searched. However, setting it for the first time programmatically and not including the default paths is very wrong and causes all kinds of brokenness everywhere.
So I think this fix is not needed in x11-common, but mainly just in snapd.
Version 2.0.5 of snapd in -proposed has a fix for this script. See https:/ /bugs.launchpad .net/bugs/ 1575014 for details and even more problems seemingly unrelated to snapd, but caused by its broken $XDG_DATA_DIRS handling.
It's actually perfectly fine to not have the variable set at all if only the default paths should be searched. However, setting it for the first time programmatically and not including the default paths is very wrong and causes all kinds of brokenness everywhere.
So I think this fix is not needed in x11-common, but mainly just in snapd.