Subject: bug#180: slim helper should check for presence of /etc/default/locale

From: Hleb Valoshka <[email-masked]>
Date: Sat, 17 Feb 2018 14:09:13 +0300

Package: slim

During the Ascii test I've noticed that I can't start any desktop
environments using lightdm. In its logs I found the reason: absence of
/etc/default/locale. My test system was installed using debootstrap,
so it has no locales configured.

Actual file reading /etc/default/locale is
/etc/X11/Xsession.d/20slim_locale from the slim package.

A patch is attached.
--- slim/debian/local/Xsession.d/20slim_locale.orig	2018-02-17 13:56:31.094183877 +0300
+++ slim/debian/local/Xsession.d/20slim_locale	2018-02-17 13:57:57.741563491 +0300
@@ -1,5 +1,7 @@
 #!/bin/sh
-. /etc/default/locale
+if test -r /etc/default/locale; then
+  . /etc/default/locale
+fi
 for lt_var in $(env -i locale | sed -e 's/=.*$//') LANGUAGE
 do
 	eval "if test \"\${$lt_var+set}\" = set; then