[Pkg-xfce-devel] Bug#639984: please reconsider clearing DISPLAY in lightdm startup script

chrysn chrysn at fsfe.org
Tue Jan 27 20:05:21 UTC 2015

hello yves-alexis,

i'd like to ask you to reconsider your stance on clearing the DISPLAY
variable in the lightdm startup script.

granted, calling `/etc/init.d/lightdm restart` may not be the preferred
way of starting and stopping services any more, but as long as those
scripts don't actively resist invocation, they will be used.

while it's probably even a good idea that the lightdm binary does
something reasonable in the presence of DISPLAY, i'm pretty sure that
the lightdm instance started by the init script is never supposed to be
used in connection with a pre-set environment variable -- as you noted,
the more modern invocations of init scripts would clean that out anyway.

the situation i've ended up is similar to those situations described
earlier -- display went blank, trying to get the box up and running from
remote again, and DISPAY being set. the altered behavior of lightdm in
that situation is subtle to debug. the way Xephyr fails ("Unrecognized
option: -novtswitch / use: X [:<display>] [option]") doesn't help
either. i ended up grepping through the lightdm source code when i
discovered the Xephyr thing until i unset the DISPLAY variable and later
found this bug report. a warning along the lines of `env |grep
'^DISPLAY=' >/dev/null && echo 'Warning: DISPLAY set, lightdm will
misbehave. Use invoke-rc.d instead.'` would have helped a lot.

i'm not saying that the lightdm init script is wrong in not clearing
DISPLAY if init scripts may rely on having a cleaned environment. but as
long as this is not enforced, lightdm failing to be started from the
init script under the described conditions is a very harsh way of
educating users.

best regards

Most people would leave. Not us. We're Vikings. We have stubbornness issues.
  -- Hiccup, son of Stoic

More information about the Pkg-xfce-devel mailing list