Hi Ludo and Danny, Date: Thu, 25 Apr 2019 11:36:36 -0400
Ludovic Courtès <l...@gnu.org> writes: > Danny Milosavljevic <dan...@scratchpost.org> skribis: > >> Apr 21 11:23:57 localhost gdm: XXX gdm: value == NULL for key == PATH >> Apr 21 11:23:57 localhost gdm: Child process -1384 was already dead. >> Apr 21 11:23:57 localhost gdm: Child process 1381 was already dead. >> Apr 21 11:23:57 localhost gdm: Unable to kill session worker process > > Good catch! > > Looks like setting PATH in GDM’s environment isn’t enough, though… The PATH variable for GDM gets set in the package definition, too. GDM does a lot of environment clobbering, so it probably gets lost along the way (it wants to follow the PAM default environment files rather than propagate things down). That being said, I don’t think this is the issue. GDM is hard-coded to fail if there are no “.desktop” files. This happens in the “get_fallback_session_name” function. As an experiment, I tried patching this out, which allows me to type in a password, but fails later in the same way. I’m not sure why. I suppose we should add a default “.desktop” file to keep GDM from exploding. I did look at Danny’s patch (#35377), and it would work, but it seems a little arbitrary. Nothing understands the “Exec=custom” line, and our “xinitrc” runs “~/.xsession” regardless of what desktop entry is selected in the DM. There are two workarounds. The first is to keep Danny’s patch as-is, but add logic to “xinitrc” so that it only uses “~/.xsession” when passed “custom” as an argument (it’s kinda magic, but it seems to be a common convention). I have a slight preference for this option, because it makes the whole “~/.xsession” thing more explicit. However, it would break other DMs that don’t install a “custom.desktop”. Maybe we could integrate it into all DMs at the service level. The quicker workaround is to keep the current logic, and install the following with GDM: [Desktop Entry] Encoding=UTF-8 Type=Application Name=Fail Comment=This session always fails. NoDisplay=true Exec=false This way, GDM fails cleanly when there are no “.desktop” files. It doesn’t show up in the list, either (“NoDisplay=true”), so everything just kinda works as expected without any visible changes. Danny, maybe you could adjust your patch to follow the second option and apply it for the sake of everyone else who’s system profile doesn’t have any “.desktop” files. It might save people headaches in the short-term regardless of what we settle on as a final solution. Thoughts? -- Tim