| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
One feature that GDM is supposed to support is a precedence order
for loading xsession files.
If someone has a file in /etc/X11/sessions it's supposed to override
a file in /usr/share/xsessions.
This works okay from a backend point of view. /etc/X11/sessions can
change the command getting run, for instance, but it doesn't work
from a front end point of view. Menu items can't get hidden in
the session cog.
This is due to a bug in libgdm where it inadvertently gives
/usr/share/xsessions higher precedence than /etc/X11/sessions.
This commit fixes that by processing the lists in reverse order,
and making sure to remove already added entries if overriding
entries are hidden.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If GDM_SUPPORTED_SESSION_TYPES is not set in the environment, calling
any libgdm function which internally calls collect_sessions() will log a
CRITICAL from trying to g_strsplit() a NULL string. This may happen if,
for example, a developer is launching gnome-shell directly, rather than
it being launched by GDM.
Don't try to split the NULL string. The rest of collect_sessions()
already gracefully handles supported_session_types being NULL, so no
further changes are needed to the function.
Fixes: https://gitlab.gnome.org/GNOME/gdm/-/issues/748
|
|
|
|
|
|
| |
Right now the session list comes out in hash table order.
This commit changes the code to sort by description.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There's currently a way to disable wayland, but no way to disable Xorg.
We currently prefer wayland if it's not disabled, but have no way to
prefer Xorg without disabling wayland entirely.
There's currently no way use legacy Xorg support at all if user display
server support is enabled at a build time.
This commit adds more flexibility to display server selection. It adds
two new keys: XorgEnable and and PreferredDisplayServer.
XorgEnable=false disables Xorg support entirely on seat 0.
PreferredDisplayServer can be set to "wayland", "xorg", "legacy-xorg" or
"none" to select which display server is used by default. If it's set to
"wayland", it will fall back to "xorg". If it's set to "xorg" it will
fall back to "wayland".
|
|
|
|
|
| |
When gdm works on Xorg it's possible to have duplicate sessions, we need
to remove them.
|
|
|
|
|
|
|
| |
The duplicate sessions id is not used in remove_duplicate_sessions(), so remove
it to mute the warning.
https://gitlab.gnome.org/GNOME/gdm/merge_requests/75
|
|
|
|
|
| |
Gdm leaks session dir names, so use a ptr array with a free function and
auto-pointers to manage the strings lifecycle.
|
|
|
|
|
| |
I put this inside an `#ifdef ENABLE_WAYLAND_SUPPORT` before, which would
mean that it's not called if that's not defined.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We add sessions to a hash table keyed on the basename without extension,
and while we're adding them we de-duplicate based on the translated name
(the text that will be visible in the switcher).
This has a problem. In this situation:
```
laney@disco:~$ tree /usr/share/{wayland-,x}sessions/
/usr/share/wayland-sessions/
├── gnome.desktop
└── ubuntu-wayland.desktop
/usr/share/xsessions/
├── gnome.desktop -> gnome-xorg.desktop
├── gnome-xorg.desktop
└── ubuntu.desktop
```
We process the X sessions first, and then the Wayland sessions. The
deduplication might end up removing `xsessions/gnome-xorg` and leaving
`xsessions/gnome`. Then when we come to process the Wayland sessions, we
will clobber `xsessions/gnome` with `wayland-sessions/gnome`, as they
have the same ID.
When everything is working, it is actually *intentional* that
`xsessions/gnome` gets clobbered, so that you end up seeing "GNOME"
(wayland) and "GNOME on Xorg" in the switcher, and not (e.g.) "GNOME on
Xorg" twice, and you have the correct fallback behaviour in case you ever
enable/disable Wayland.
Instead of filtering while we add things, we can add all the sessions we
find (clobbering duplicate IDs as before), and then process the list
once at the end, removing sessions with duplicated visible names at that
point.
Closes: #473
|
|
|
|
| |
Fixes issue #470.
|
|
|
|
|
|
|
|
|
|
|
| |
Right now if two session files have the same translated name, the login
screen will show both of them. There's no way the user can know which
session does which, so that's not a great user experience. Furthermore,
in the face of symlinks, both sessions truely could be identical.
This commit filters out the duplicates, so only one shows in the list.
Closes https://gitlab.gnome.org/GNOME/gdm/issues/437
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The gdm_available_sessions_map hash table is set up with a value-free
function that frees the struct itself, but not its contents.
Of course elements are never removed from the map, so this fix doesn't
matter in practice.
https://bugzilla.gnome.org/show_bug.cgi?id=793855
|
|
|
|
|
|
|
|
|
|
| |
This is done under the assumption that they are meant for Wayland only.
It is expected that a session called "foo" would have a "foo.desktop" file
under wayland-sessions/, a fallback "foo.desktop" under xsessions/, and
another "foo-xorg.desktop" under xsessions (that may simply be a symlink
to "foo.desktop") specifically for Wayland.
https://bugzilla.gnome.org/show_bug.cgi?id=788552
|
|
|
|
|
|
|
|
|
|
|
|
| |
Right now we hide wayland sessions from the list if the greeter isn't
wayland. The greeter is never wayland if built with
--disable-user-display-server.
This commit allows wayland sessions for the user session, when
--disable-user-display-server --enable-wayland-support is specified,
even though the greeter won't use wayland itself.
https://bugzilla.gnome.org/show_bug.cgi?id=787899
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We use wayland by default on the login screen, so if we're running
in an X11 session, then the presumption is that we're incapable of
using wayland. If we're incapable of using wayland sessions then
we shouldn't present those sessions to the user in the session list
either.
This commit makes sure to avoid showing wayland based sessions
in the session list if the login screen is running on X11.
https://bugzilla.gnome.org/show_bug.cgi?id=757715
|
|
|
|
|
|
|
|
|
|
| |
This commit splits the code for getting sessions up into two chunks:
xorg and wayland.
This is necessary because future commits will treat xorg and wayland
sessions differently.
https://bugzilla.gnome.org/show_bug.cgi?id=757715
|
|
|
|
|
|
|
| |
FreeBSD build broke, so this commit makes wayland a configure time
argument
https://bugzilla.gnome.org/show_bug.cgi?id=726380
|
|
|
|
|
|
| |
Add the wayland-sessions directory, as shipped by gdm.
https://bugzilla.gnome.org/show_bug.cgi?id=726380
|
|
libgdm isn't a UI, so it's weird to be in a directory
called GUI.
This commit moves it up a layer.
|