[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#35068: GDM crashes when it cannot find any .desktop files

From: Danny Milosavljevic
Subject: bug#35068: GDM crashes when it cannot find any .desktop files
Date: Fri, 26 Apr 2019 11:36:03 +0200

Hi Timothy,

On Thu, 25 Apr 2019 21:02:53 -0400
Timothy Sample <address@hidden> wrote:

> Furthermore (I was surprised by this), even though the
> “data/Xsession.in” script says that it will honour “custom” in a
> comment, the code says otherwise.  There’s a commit where support for it
> gets removed, but they must have forgotten about the comment.

> We don’t need a “.desktop” file currently.  My personal opinion is that
> having the existence of the “~/.xsession” script override your
> explicitly stated session selection when logging in is a little
> surprising.  But if that’s conventional, then I’m happy to follow
> convention.

I don't know what's conventional here.

But a CUSTOM session is just that:
A customer customized their session and presumably wants to enter that
customized session.  However, he should still be able to enter other
sessions by selecting a non-customized session in the DM.

If I wrote a DM, I'd scan for desktop files, add those to the session selection
menu, then scan for the file "~/.xsession" and, if that exists, add a
"custom" entry to the session selection menu.

The session that had been selected previously for that user should be the
default for that user the next time--unless he changes the selection again.

The first time a ~/.xsession shows up, the session manager should select it
(or ask).

In any case, let's just make gdm not crash and do a minimally invasive fix.
We are not upstream and they can clean up their own mess.

> >> 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.  


> Currently, our “xinitrc” script will run your “~/.xsession” script if it
> exists, regardless of what session you select when logging in.

Hmm, that's not what I thought it would do.  We could change it...

> However, GDM will crash if you do not have any “.desktop” files.

Yeah, there are a lot of places where it assumes that desktop files
have been read.  Even the "fallback" case requires desktop files.

>  With
> the dummy file, if you have a “~/.xsession” script, you will be able to
> log in even if you have no other “.desktop” files.  If you have no
> “.desktop” files and no “~/.xsession” script, logging in will fail
> (which seems reasonable, seeing how desperate the circumstances are).

That's fair.

> > Still, ~/.xinitrc is not picked up either way--which is too bad.  
> Isn’t that script specific to “startx”?  (That’s at least what a popular
> question and answer site tells me.)

Yes, I had it from the time I still used startx.

So I guess it's okay if .xinitrc isn't used by gdm.

It would still be nice if .xsession was only used for the "custom session"
choice, which is what I wanted it to do.  I guess we could also adapt
our xinitrc script.

Attachment: pgpYu6Kcj0req.pgp
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]