| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Our turkey has freezer burn, so I'm dropping it.
https://gitlab.gnome.org/GNOME/gdm/-/merge_requests/96
|
|
|
|
|
|
|
|
|
|
| |
We're going to be switching to meson, and meson doesn't
deal too well with an @ in the configuration file that's not
part of a substitution variable.
This commit switches the gdm service over to use a cmake style
of substitution variables, so we can later tell meson to use
configure in cmake mode and workaround the @ confusion.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Unfortunately, GDM may be running multiple greeters, and each greeter is
currently using the same user. So while in a lot of setups each user
should only have one graphical session and also only one DBus session
bus, this is not true for the gdm greeter.
Lacking another solution (e.g. separate users), we need to be able to
correctly lookup the session information for all greeter instances. We
can do so by using sd_pid_get_session and using this information is safe
if it does return something.
See: #526
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
If (e.g.) gnome-shell is started as a systemd --user unit, it won't be
part of the login session. We should instead look through all of the
user's sessions until we find the login session, and take that as our
session.
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
Various generated files are ending up being disted, which is wrong
becuase they leak the maintainer's prefix into the tarball and are
generated anyway during build.
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
This also gets rid of the deprecated `g_type_class_add_private()`
|
| |
|
|
|
|
|
| |
Using auto pointers allows to manage things in a cleaner way without having
to manually unref things before returning.
|
| |
|
|
|
|
|
| |
There's no need to keep the manager connection address around, and
use autofree to clean it up
|
|
|
|
|
|
|
|
|
| |
Instead of using the hard-to-maintain shared pointer to the dbus connection
to the manager and reset it when the proxies that use it are deleted, just
look which proxy is currently available and try to reuse the connection
from it.
Fixes #386
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Both if we re-use the shared connection in `gdm_client_get_connection` and if
we create a new one in `on_connected`, we steal the pointer here by using
`g_task_propagate_pointer` and thus we don't have to add an additional
reference to this connection when returning, or it won't ever be consumed by
function customers.
|
|
|
|
|
|
|
|
|
| |
This instance has already been reffed when passed to the task, and since
we're stealing it with `g_task_propagate_pointer` it won't be unreffed.
We could also do this in the `on_reauthentication_channel_opened` callback
but since the new task will ref it anyway, we can just be clean and do it
here.
|
|
|
|
|
|
|
|
|
| |
The GDBusProxies hold a strong reference to the connection themselves,
so maintaining separate weak references is unnecessary.
This commit drops those extraneous weak references.
https://bugzilla.gnome.org/show_bug.cgi?id=795940
|
|
|
|
|
|
|
|
|
|
|
| |
At the moment we call gdm_client_open_connection and when it finishes,
assume client->priv->connection is implicitly initialized.
This commit makes the operation more explicit by changing
gdm_client_open_connection to gdm_client_get_connection and returning
the GDBusConnection object directly, instead of returning a boolean.
https://bugzilla.gnome.org/show_bug.cgi?id=795940
|
|
|
|
|
|
|
|
|
|
|
| |
At the moment we add a weakref on each proxy to the connection
object. For the _sync variant functions, When the weakref fires,
they call g_clear_object, clearing the connection, even if other
proxies still have a reference.
This commit changes that weak ref code to use g_object_unref instead.
https://bugzilla.gnome.org/show_bug.cgi?id=795940
|
|
|
|
|
|
|
|
|
|
|
|
| |
Right now we keep the manager proxy alive long after we need it.
It doesn't get cleared until one of the other proxies go away.
That is not only unnecessary but illogical and confusing.
This commit changes the manager proxy to be transient—only alive
long enough to get what we need from it.
https://bugzilla.gnome.org/show_bug.cgi?id=795940
|
|
|
|
|
|
|
|
|
| |
The manager fetching code in GdmClient treats its task
return value as boolean, but it's actually a pointer (the manager)
This commit corrects the confusion.
https://bugzilla.gnome.org/show_bug.cgi?id=795940
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Right now libgdm tries to handle multiple simultaneous
open calls at the same time by serializing the requests
and giving them all the same connection. It's broken,
though.
- The pending_opens list is never populated, so we
end up just doing multiple simultaneous open
operations at a time anyway.
- The finish code ends up calling
g_task_return_error (task, NULL) instead of
g_task_return_pointer in the non-error case.
Since the feature doesn't work, drop it for now.
https://bugzilla.gnome.org/show_bug.cgi?id=795940
|
|
|
|
|
|
|
|
|
| |
At the moment we fail to nullify GdmClient's
connection to GDM when the connection is disposed.
This commit adds a weak pointer to correct that mistake.
https://bugzilla.gnome.org/show_bug.cgi?id=795940
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If an async task tries to reuse an open connection,
it erroneously explicitly unrefs it. That is incorrect,
because there are weak references in use to handle
disposing the connection when its no longer in use.
This commit makes sure the local connection object
in open_connection is nullified so the connection
doesn't get autofree'd.
https://bugzilla.gnome.org/show_bug.cgi?id=795940
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=783082
|
| |
|
| |
|
|
|
|
|
|
| |
This provides gnome-shell with a way to use the new interface.
https://bugzilla.gnome.org/show_bug.cgi?id=788851
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
Now that consolekit support is gone, this commit drops all
the conditionalizing of logind support.
https://bugzilla.gnome.org/show_bug.cgi?id=743940
|
|
|
|
|
|
| |
It was deprecated in 3.16 to be removed in 3.18
https://bugzilla.gnome.org/show_bug.cgi?id=743940
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The openSUSE Build Service raises a flag for
[ 55s] I: Program returns random data in a function
[ 55s] E: gdm no-return-in-nonvoid-function gdm-common.c:850
[ 55s] E: gdm no-return-in-nonvoid-function gdm-user-switching.c:597
This can happen when CONSOLEKIT is disabled (As is newly the case) and
LOGING_RUNNING would return false.
Based on a patch by Dominique Leuenberger
https://bugzilla.gnome.org/show_bug.cgi?id=744787
|
|
|
|
|
|
|
|
| |
g_dbus_connection_new_for_address_finish() returns a new reference;
we can't simply ignore the returned connection, even though it is also
passed in as the source object of the GAsyncReadyCallback.
https://bugzilla.gnome.org/show_bug.cgi?id=738246
|
|
|
|
|
|
|
| |
g_async_result_get_source_object() returns a reference that must be
unreferenced.
https://bugzilla.gnome.org/show_bug.cgi?id=738246
|
|
|
|
|
|
|
| |
All async results were leaked, since g_simple_async_result_complete_in_idle()
takes a new reference rather than assuming the ref passed in.
https://bugzilla.gnome.org/show_bug.cgi?id=738246
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously we would emit the timed-login-requested signal after the
client connects, which might be before it was listening for the
signal.
Now we only emit the signal in direct response to a GetTimedLoginDetails
call, which we make implicitly when the appropiate proxy interface is
set up.
https://bugzilla.gnome.org/show_bug.cgi?id=680348
|
|
|
|
|
|
|
| |
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.
|