all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Pierre Neidhardt <mail@ambrevar.xyz>
Cc: 37831@debbugs.gnu.org
Subject: bug#37831: GDM has a GNOME entry even when not installed
Date: Sat, 11 Apr 2020 18:31:48 +0200	[thread overview]
Message-ID: <87blnyrnkb.fsf@gnu.org> (raw)
In-Reply-To: <87lftfd5wi.fsf@ambrevar.xyz> (Pierre Neidhardt's message of "Sun, 20 Oct 2019 13:15:41 +0200")

Hi,

Pierre Neidhardt <mail@ambrevar.xyz> skribis:

> My config.scm installs EXWM + StumpWM, but not GNOME.
> Before the last core-update, GDM would only suggest the 2 window
> managers.
>
> After a recent Guix pull followed by a `guix system reconfigure', GDM
> also suggests GNOME.  If I select it, it fails to log in, which I
> suppose is expected since it's not installed.
>
> I believe the GNOME entry in GDM should only appear if GNOME is installed.

I investigated this issue.

‘collect_sessions’ in ‘gdm-sessions.c’ does this:

--8<---------------cut here---------------start------------->8---
const char *xorg_search_dirs[] = {
        "/etc/X11/sessions/",
        DMCONFDIR "/Sessions/",
        DATADIR "/gdm/BuiltInSessions/",
        DATADIR "/xsessions/",
        NULL
};

xorg_search_array = g_array_new (TRUE, TRUE, sizeof (char *));

const gchar * const *system_data_dirs = g_get_system_data_dirs ();

for (i = 0; system_data_dirs[i]; i++) {
        session_dir = g_build_filename (system_data_dirs[i], "xsessions", NULL);
        g_array_append_val (xorg_search_array, session_dir);
}

g_array_append_vals (xorg_search_array, xorg_search_dirs, G_N_ELEMENTS (xorg_search_dirs));

if (gdm_available_sessions_map == NULL) {
        gdm_available_sessions_map = g_hash_table_new_full (g_str_hash, g_str_equal,
                                                            g_free, (GDestroyNotify)gdm_session_file_free);
}

for (i = 0; i < xorg_search_array->len; i++) {
        collect_sessions_from_directory (g_array_index (xorg_search_array, gchar*, i));
}
--8<---------------cut here---------------end--------------->8---

‘gnome-desktop.desktop’, which contains the GNOME entry, is picked up
from $(guix build gnome-session)/share/xsessions, which happens to be
one of the ‘system_data_dirs’ elements (via $XDG_DATA_DIR).

So I thought that setting:

  system_data_dirs = { NULL };

would solve the issue.  Alas, it seems that when we do that, either the
array remains empty or somehow ‘collect_sessions_from_directory’ is not
called.

I can’t attach GDM though, or I don’t know what to attach it to…

Ideas anyone?

Thanks,
Ludo’.

  parent reply	other threads:[~2020-04-11 16:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-20 11:15 bug#37831: GDM has a GNOME entry even when not installed Pierre Neidhardt
2020-02-14 19:14 ` Maxim Cournoyer
2020-04-11 16:31 ` Ludovic Courtès [this message]
2020-04-11 22:23 ` Ludovic Courtès
2020-04-12  7:52   ` Pierre Neidhardt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87blnyrnkb.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=37831@debbugs.gnu.org \
    --cc=mail@ambrevar.xyz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.