Something like @@ -576,9 +582,15 @@ continue; } + g_debug ("considering %s", base_name); if (get_session_command_for_file (self, base_name, NULL)) { - - g_sequence_insert_sorted (sessions, g_strdup (base_name), (GCompareDataFunc) g_strcmp0, NULL); + g_debug ("yes, adding"); + name = g_strndup (base_name, + strlen (base_name) - + strlen (".desktop")); + g_sequence_insert_sorted (sessions, name, (GCompareDataFunc) g_strcmp0, NULL); + } else { + g_debug ("no, not adding"); } } while (base_name != NULL); @@ -589,25 +601,22 @@ name = NULL; session = g_sequence_get_begin_iter (sessions); + g_debug ("iterating the GSequence"); + if (g_sequence_iter_is_end (session)) g_error ("GdmSession: no session desktop files installed, aborting..."); do { if (g_sequence_get (session)) { - char *base_name; - - g_free (name); - base_name = g_sequence_get (session); - name = g_strndup (base_name, - strlen (base_name) - - strlen (".desktop")); - + name = g_sequence_get (session); + g_debug ("iter: looking at %s", name); break; } session = g_sequence_iter_next (session); } while (!g_sequence_iter_is_end (session)); g_free (self->priv->fallback_session_name); + g_debug ("setting fallback_session_name to: %s", name); self->priv->fallback_session_name = name; g_sequence_free (sessions);
makes it start the ubuntu (wayland) session, but then GDM is constantly restarting in a loop. Could just be some weirdness in my VM, looking. -- You received this bug notification because you are a member of Desktop Packages, which is subscribed to gnome-session in Ubuntu. https://bugs.launchpad.net/bugs/1705157 Title: "Ubuntu" and "Ubuntu on Xorg" randomly start the same session (maybe Wayland maybe Xorg) Status in gnome-session: Confirmed Status in gdm3 package in Ubuntu: In Progress Status in gnome-session package in Ubuntu: Invalid Bug description: Test case: Do a fresh install of current image (july 19 here Boot up, check selected session at the greeter - it will say "ubuntu" Log in, ck. env., it will actually be ubuntu-wayland Ex. $ env | grep -i wayland DESKTOP_SESSION=ubuntu-wayland WAYLAND_DISPLAY=wayland-0 XDG_SESSION_TYPE=wayland XDG_SESSION_DESKTOP=ubuntu-wayland GDMSESSION=ubuntu-wayland Test 2: From above log out, switch session in greeter to wayland on ubuntu,, switch back to ubuntu, login. Now you'll be in an ubuntu session Test 3: log out from above ubuntu session, log into ubuntu-wayland session, reboot. At greeter notice it says "ubuntu" selected. Login, ck. session. You'll actually be in an ubuntu-wayland session ProblemType: Bug DistroRelease: Ubuntu 17.10 Package: ubuntu-session 3.24.1-0ubuntu15 ProcVersionSignature: Ubuntu 4.11.0-10.15-generic 4.11.8 Uname: Linux 4.11.0-10-generic x86_64 ApportVersion: 2.20.5-0ubuntu5 Architecture: amd64 CurrentDesktop: GNOME Date: Tue Jul 18 21:48:10 2017 InstallationDate: Installed on 2017-07-19 (0 days ago) InstallationMedia: Ubuntu 17.10 "Artful Aardvark" - Alpha amd64 (20170718) ProcEnviron: TERM=xterm-256color PATH=(custom, no user) XDG_RUNTIME_DIR=<set> LANG=en_US.UTF-8 SHELL=/bin/bash SourcePackage: gnome-session UpgradeStatus: No upgrade log present (probably fresh install) To manage notifications about this bug go to: https://bugs.launchpad.net/gnome-session/+bug/1705157/+subscriptions -- Mailing list: https://launchpad.net/~desktop-packages Post to : desktop-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~desktop-packages More help : https://help.launchpad.net/ListHelp