[mutter/wip/benzea/systemd-user] meta-launcher: Explicitly look up object path for seat
- From: Benjamin Berg <bberg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/benzea/systemd-user] meta-launcher: Explicitly look up object path for seat
- Date: Fri, 10 May 2019 17:49:16 +0000 (UTC)
commit 3c6484d39b0df2576f79e0e485e685099dd5fce1
Author: Benjamin Berg <bberg redhat com>
Date: Fri May 10 19:29:47 2019 +0200
meta-launcher: Explicitly look up object path for seat
If mutter is running as a systemd user service, then we cannot use the
magic "self" session for the ID lookup. For now we need to lookup the ID
explicitly. Eventually we can change to use the magic "auto" paths for
both the session and seat, but that will require systemd v243.
See also https://github.com/systemd/systemd/pull/12424#issuecomment-487962314
https://gitlab.gnome.org/GNOME/mutter/merge_requests/571
src/backends/native/meta-launcher.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/src/backends/native/meta-launcher.c b/src/backends/native/meta-launcher.c
index 93a1ca2f1..680749df5 100644
--- a/src/backends/native/meta-launcher.c
+++ b/src/backends/native/meta-launcher.c
@@ -251,13 +251,15 @@ get_session_proxy (GCancellable *cancellable,
}
static Login1Seat *
-get_seat_proxy (GCancellable *cancellable,
+get_seat_proxy (gchar *seat_id,
+ GCancellable *cancellable,
GError **error)
{
+ g_autofree char *seat_proxy_path = get_escaped_dbus_path ("/org/freedesktop/login1/seat", seat_id);
Login1Seat *seat = login1_seat_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM,
G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START,
"org.freedesktop.login1",
- "/org/freedesktop/login1/seat/self",
+ seat_proxy_path,
cancellable, error);
if (!seat)
g_prefix_error(error, "Could not get seat proxy: ");
@@ -493,6 +495,7 @@ meta_launcher_new (GError **error)
g_autoptr (Login1Session) session_proxy = NULL;
g_autoptr (Login1Seat) seat_proxy = NULL;
g_autofree char *seat_id = NULL;
+ g_autofree char *seat_proxy_path = NULL;
gboolean have_control = FALSE;
session_proxy = get_session_proxy (NULL, error);
@@ -511,7 +514,7 @@ meta_launcher_new (GError **error)
if (!seat_id)
goto fail;
- seat_proxy = get_seat_proxy (NULL, error);
+ seat_proxy = get_seat_proxy (seat_id, NULL, error);
if (!seat_proxy)
goto fail;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]