From mboxrd@z Thu Jan 1 00:00:00 1970 From: Timothy Sample Subject: bug#35068: GDM crashes when it cannot find any .desktop files Date: Thu, 25 Apr 2019 14:49:42 -0400 Message-ID: <87tvel7we1.fsf@ngyro.com> References: <87lg0um9qb.fsf@gnu.org> <20190420170649.30c05dbd@scratchpost.org> <20190421113749.0439cbc9@scratchpost.org> <87v9z72k3p.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([209.51.188.92]:55177) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hJjcz-000064-Mm for bug-guix@gnu.org; Thu, 25 Apr 2019 15:01:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hJjRa-0005v0-U0 for bug-guix@gnu.org; Thu, 25 Apr 2019 14:50:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:45807) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hJjRa-0005sv-QJ for bug-guix@gnu.org; Thu, 25 Apr 2019 14:50:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hJjRa-0004pH-Em for bug-guix@gnu.org; Thu, 25 Apr 2019 14:50:02 -0400 In-Reply-To: <87lg0um9qb.fsf@gnu.org> Sender: "Debbugs-submit" Resent-Message-ID: List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 35068@debbugs.gnu.org Hi Ludo and Danny, Date: Thu, 25 Apr 2019 11:36:36 -0400 Ludovic Court=C3=A8s writes: > Danny Milosavljevic skribis: > >> Apr 21 11:23:57 localhost gdm: XXX gdm: value =3D=3D NULL for key =3D=3D= PATH=20 >> Apr 21 11:23:57 localhost gdm: Child process -1384 was already dead.=20 >> Apr 21 11:23:57 localhost gdm: Child process 1381 was already dead.=20 >> Apr 21 11:23:57 localhost gdm: Unable to kill session worker process=20 > > Good catch! > > Looks like setting PATH in GDM=E2=80=99s environment isn=E2=80=99t enough= , though=E2=80=A6 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=E2=80=99t think this is the issue. GDM is hard-coded to fail if there are no =E2=80=9C.desktop=E2=80=9D files.= This happens in the =E2=80=9Cget_fallback_session_name=E2=80=9D 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=E2=80=99m not sure why. I suppose we should add a default =E2=80=9C.desktop=E2=80=9D file to keep G= DM from exploding. I did look at Danny=E2=80=99s patch (#35377), and it would work= , but it seems a little arbitrary. Nothing understands the =E2=80=9CExec=3Dcusto= m=E2=80=9D line, and our =E2=80=9Cxinitrc=E2=80=9D runs =E2=80=9C~/.xsession=E2=80=9D = regardless of what desktop entry is selected in the DM. There are two workarounds. The first is to keep Danny=E2=80=99s patch as-i= s, but add logic to =E2=80=9Cxinitrc=E2=80=9D so that it only uses =E2=80=9C~/= .xsession=E2=80=9D when passed =E2=80=9Ccustom=E2=80=9D as an argument (it=E2=80=99s kinda magic, b= ut it seems to be a common convention). I have a slight preference for this option, because it makes the whole =E2=80=9C~/.xsession=E2=80=9D thing more explicit. Howe= ver, it would break other DMs that don=E2=80=99t install a =E2=80=9Ccustom.desktop=E2=80= =9D. 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=3DUTF-8 Type=3DApplication Name=3DFail Comment=3DThis session always fails. NoDisplay=3Dtrue Exec=3Dfalse This way, GDM fails cleanly when there are no =E2=80=9C.desktop=E2=80=9D fi= les. It doesn=E2=80=99t show up in the list, either (=E2=80=9CNoDisplay=3Dtrue=E2= =80=9D), 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=E2=80=99s system profile doesn= =E2=80=99t have any =E2=80=9C.desktop=E2=80=9D files. It might save people headaches in th= e short-term regardless of what we settle on as a final solution. Thoughts? -- Tim