On Fri, Sep 19, 2014 at 11:04 PM, Owen Taylor <[email protected]> wrote:

> On Fri, 2014-09-19 at 22:49 +0300, Alberts Muktupāvels wrote:
> > On Fri, Sep 19, 2014 at 10:27 PM, Owen Taylor <[email protected]>
> > wrote:
> >         On Fri, 2014-09-19 at 20:26 +0300, Alberts Muktupāvels wrote:
> >
> >         > question to gnome-session and gnome-shell developers about
> >         End Session
> >         > dialog.
> >         >
> >         >
> >         > Currently gnome-session expect that End Session Dialog is
> >         available on
> >         > org.gnome.Shell. Can we change it so it does not require
> >         > org.gnome.Shell for that dialog?
> >
> >         What's your reasoning for why you want this to be done?
> >
> > I am trying to keep alive old classic / fallback session now known as
> > Flashback session (metacity, gnome-panel). To show End Session Dialog
> > we need to connect to org.gnome.Shell. That works, but now
> > applications thinks that GNOME Shell is running...
>
> This is tricky - GNOME Shell is a system component of GNOME, and
> dependencies on it aren't limited to gnome-session - I also, for
> example, see uses of GNOME SHell D-Bus interfaces in
> gnome-control-center and gnome-settings-daemon.
>

I am right now running Flashback session without GNOME Shell.
gnome-settings-daemon and gnome-control-center works without it. So at
least for now I don't see problem here.

(Do global keybindings work without GNOME Shell running? I thought they
> relied on GNOME Shell for that for now.)
>

Probably not, but that is other problem that I will have to deal with.


> My opinion is that the Fllashback cannot increase the maintenance load
> of GNOME ... there's a reason we wanted to get rid of fallback mode.
>

It is not my intention. I attached example.patch for gnome-session. Then we
need patch for gnome-shell to export EndSessionDialog interface on
org.gnome.SessionManager.EndSessionDialog not on org.gnome.Shell. It does
not look like it would increase the maintenance load, but would allow
Flashback session to show that dialog without using org.gnome.Shell.

-- 
Alberts Muktupāvels
From 2abdf9f887164998863298aa55a3f12705132524 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Alberts=20Muktup=C4=81vels?= <[email protected]>
Date: Fri, 19 Sep 2014 23:23:11 +0300
Subject: [PATCH] example

---
 gnome-session/gsm-manager.c |  3 ---
 gnome-session/gsm-shell.c   | 12 ++++++------
 2 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/gnome-session/gsm-manager.c b/gnome-session/gsm-manager.c
index 596db92..48176ad 100644
--- a/gnome-session/gsm-manager.c
+++ b/gnome-session/gsm-manager.c
@@ -3018,9 +3018,6 @@ static void
 show_shell_end_session_dialog (GsmManager                   *manager,
                                GsmShellEndSessionDialogType  type)
 {
-        if (!gsm_shell_is_running (manager->priv->shell))
-                return;
-
         gsm_shell_open_end_session_dialog (manager->priv->shell,
                                            type,
                                            manager->priv->inhibitors);
diff --git a/gnome-session/gsm-shell.c b/gnome-session/gsm-shell.c
index da9aec3..244763e 100644
--- a/gnome-session/gsm-shell.c
+++ b/gnome-session/gsm-shell.c
@@ -36,8 +36,9 @@
 #define SHELL_PATH      "/org/gnome/Shell"
 #define SHELL_INTERFACE "org.gnome.Shell"
 
-#define SHELL_END_SESSION_DIALOG_PATH      "/org/gnome/SessionManager/EndSessionDialog"
-#define SHELL_END_SESSION_DIALOG_INTERFACE "org.gnome.SessionManager.EndSessionDialog"
+#define END_SESSION_DIALOG_NAME      "org.gnome.SessionManager.EndSessionDialog"
+#define END_SESSION_DIALOG_PATH      "/org/gnome/SessionManager/EndSessionDialog"
+#define END_SESSION_DIALOG_INTERFACE "org.gnome.SessionManager.EndSessionDialog"
 
 #define GSM_SHELL_DBUS_TYPE_G_OBJECT_PATH_ARRAY (dbus_g_type_get_collection ("GPtrArray", DBUS_TYPE_G_OBJECT_PATH))
 
@@ -574,7 +575,6 @@ gsm_shell_open_end_session_dialog (GsmShell *shell,
                 g_warning ("Could not connect to the shell: %s",
                            error->message);
                 g_error_free (error);
-                return FALSE;
         }
 
         if (shell->priv->end_session_open_call != NULL) {
@@ -588,9 +588,9 @@ gsm_shell_open_end_session_dialog (GsmShell *shell,
                 DBusGProxy *proxy;
 
                 proxy = dbus_g_proxy_new_for_name (shell->priv->bus_connection,
-                                                   SHELL_NAME,
-                                                   SHELL_END_SESSION_DIALOG_PATH,
-                                                   SHELL_END_SESSION_DIALOG_INTERFACE);
+                                                   END_SESSION_DIALOG_NAME,
+                                                   END_SESSION_DIALOG_PATH,
+                                                   END_SESSION_DIALOG_INTERFACE);
 
                 g_assert (proxy != NULL);
 
-- 
2.1.0

_______________________________________________
desktop-devel-list mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/desktop-devel-list

Reply via email to