After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 656747 - GNOME Shell Extension Integration
GNOME Shell Extension Integration
Status: RESOLVED FIXED
Product: gnome-session
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: Session Maintainers
Session Maintainers
Depends on:
Blocks: 652613
 
 
Reported: 2011-08-17 13:35 UTC by Jasper St. Pierre (not reading bugmail)
Modified: 2011-08-26 23:01 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gsm: Add a flag to show the fail whale dialog on request (1.77 KB, patch)
2011-08-17 13:35 UTC, Jasper St. Pierre (not reading bugmail)
needs-work Details | Review
gsm: Add debug mode to fail whale dialog (5.80 KB, patch)
2011-08-17 13:35 UTC, Jasper St. Pierre (not reading bugmail)
needs-work Details | Review
gsm: Add a new system to manage and get information about Shell Extensions (18.29 KB, patch)
2011-08-17 13:35 UTC, Jasper St. Pierre (not reading bugmail)
none Details | Review
gsm: Add a simple tool to dump the properties of Shell Extensions (2.83 KB, patch)
2011-08-17 13:35 UTC, Jasper St. Pierre (not reading bugmail)
needs-work Details | Review
gsm: Add a UI to the fail whale for enabling and disabling Shell Extensions (5.83 KB, patch)
2011-08-17 13:35 UTC, Jasper St. Pierre (not reading bugmail)
none Details | Review
gsm: Add a new system to manage and get information about Shell Extensions (17.25 KB, patch)
2011-08-17 15:15 UTC, Jasper St. Pierre (not reading bugmail)
none Details | Review
gsm: Add a UI to the fail whale for enabling and disabling Shell Extensions (5.83 KB, patch)
2011-08-18 10:30 UTC, Jasper St. Pierre (not reading bugmail)
none Details | Review
gsm: Add a new system to get information and frob Shell Extensions (16.06 KB, patch)
2011-08-18 14:38 UTC, Jasper St. Pierre (not reading bugmail)
needs-work Details | Review
gsm: Add a flag to show the fail whale dialog on request (2.31 KB, patch)
2011-08-26 14:58 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review
gsm: Add debug mode to fail whale dialog (5.86 KB, patch)
2011-08-26 14:58 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review
gsm: Add a new system to get information and frob Shell Extensions (15.77 KB, patch)
2011-08-26 14:58 UTC, Jasper St. Pierre (not reading bugmail)
needs-work Details | Review
gsm: Add a simple tool to dump the properties of Shell Extensions (3.38 KB, patch)
2011-08-26 14:58 UTC, Jasper St. Pierre (not reading bugmail)
rejected Details | Review
gsm: Add a UI to the fail whale for enabling and disabling Shell Extensions (7.10 KB, patch)
2011-08-26 14:59 UTC, Jasper St. Pierre (not reading bugmail)
needs-work Details | Review
gsm: Add a new system to get information and frob Shell Extensions (15.97 KB, patch)
2011-08-26 15:57 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review
gsm: Add a UI to the fail whale for enabling and disabling Shell Extensions (7.19 KB, patch)
2011-08-26 20:15 UTC, Jasper St. Pierre (not reading bugmail)
reviewed Details | Review
gsm: Only show the extensions toggle when a session component asks for it (10.35 KB, patch)
2011-08-26 20:15 UTC, Jasper St. Pierre (not reading bugmail)
reviewed Details | Review
gsm: Only show extensions UI when gnome-shell crashes (5.88 KB, patch)
2011-08-26 21:14 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review
gsm: Add a UI to the fail whale for enabling and disabling Shell Extensions (7.17 KB, patch)
2011-08-26 21:15 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review

Description Jasper St. Pierre (not reading bugmail) 2011-08-17 13:35:13 UTC
Add support for disabling/enabling GNOME Shell Extensions from the fail whale dialog.
Comment 1 Jasper St. Pierre (not reading bugmail) 2011-08-17 13:35:15 UTC
Created attachment 194041 [details] [review]
gsm: Add a flag to show the fail whale dialog on request
Comment 2 Jasper St. Pierre (not reading bugmail) 2011-08-17 13:35:17 UTC
Created attachment 194042 [details] [review]
gsm: Add debug mode to fail whale dialog

The debug mode lets you crudely debug the fail whale dialog in a window
Comment 3 Jasper St. Pierre (not reading bugmail) 2011-08-17 13:35:19 UTC
Created attachment 194043 [details] [review]
gsm: Add a new system to manage and get information about Shell Extensions

This functionality will be used to allow the user to enable and disable GNOME
Shell Extensions in the fail whale dialog after a crash.

WIP: This has a bunch of debugging code because gsettings is screwing up.
I don't know why.
Comment 4 Jasper St. Pierre (not reading bugmail) 2011-08-17 13:35:22 UTC
Created attachment 194044 [details] [review]
gsm: Add a simple tool to dump the properties of Shell Extensions
Comment 5 Jasper St. Pierre (not reading bugmail) 2011-08-17 13:35:24 UTC
Created attachment 194045 [details] [review]
gsm: Add a UI to the fail whale for enabling and disabling Shell Extensions

When the session puts up the fail whale after a failed restart, the user now
has the opportunity to disable/enable extensions.
Comment 6 Jasper St. Pierre (not reading bugmail) 2011-08-17 15:15:50 UTC
Created attachment 194049 [details] [review]
gsm: Add a new system to manage and get information about Shell Extensions

This functionality will be used to allow the user to enable and disable GNOME
Shell Extensions in the fail whale dialog after a crash.



Remove debugging code, the problem I was having was local to my environment.
Comment 7 Jasper St. Pierre (not reading bugmail) 2011-08-18 10:30:48 UTC
Created attachment 194115 [details] [review]
gsm: Add a UI to the fail whale for enabling and disabling Shell Extensions

When the session puts up the fail whale after a failed restart, the user now
has the opportunity to disable/enable extensions.



s/uncompatible/incompatible/
Comment 8 Jasper St. Pierre (not reading bugmail) 2011-08-18 14:38:12 UTC
Created attachment 194136 [details] [review]
gsm: Add a new system to get information and frob Shell Extensions

This functionality will be used to allow the user to enable and disable GNOME
Shell Extensions in the fail whale dialog after a crash.



Use explicit whitelist, see: bug #654770
Comment 9 Matthias Clasen 2011-08-26 14:30:17 UTC
Review of attachment 194041 [details] [review]:

You should update doc/man/gnome-session.1 and document the new argument there.

::: gnome-session/main.c
@@ +281,3 @@
                 { "failsafe", 'f', 0, G_OPTION_ARG_NONE, &failsafe, N_("Do not load user-specified applications"), NULL },
                 { "version", 0, 0, G_OPTION_ARG_NONE, &show_version, N_("Version of this application"), NULL },
+                { "i-love-whale", 0, 0, G_OPTION_ARG_NONE, &please_fail, N_("Show the fail whale dialog for testing"), NULL },

--i-love-whale seems to be a little on the 'overly cute' side. Maybe just --whale ?
But not a big deal
Comment 10 Matthias Clasen 2011-08-26 14:42:14 UTC
Review of attachment 194042 [details] [review]:

When I try this, and hit 'Logout', I get

Gtk-Message: Failed to load module "canberra-gtk-module"
** (gnome-session:5788): DEBUG: GsmManager: Logout called

** (gnome-session:5788): CRITICAL **: gsm_manager_logout: assertion `GSM_IS_MANAGER (manager)' failed

(gnome-session:5788): GLib-GObject-WARNING **: invalid unclassed pointer in cast to `GtkWindow'
Bus error

We should just not try to call logout in debug mode, and just gtk_main_quit() in that case

::: gnome-session/gsm-fail-whale-dialog.c
@@ +136,3 @@
+                g_object_unref (priv->extensions);
+                priv->extensions = NULL;
+        }

This hunk should be in a later patch - it breaks the build here, since there is no priv->extensions.
Comment 11 Matthias Clasen 2011-08-26 14:43:47 UTC
Review of attachment 194044 [details] [review]:

It feels wierd to add code for dumping _gnome-shell_ extensions to _gnome-session_. Why should this not live in the shell ?

Also, gsm-shell-extensions.h is missing here.
Comment 12 Matthias Clasen 2011-08-26 14:43:59 UTC
Review of attachment 194041 [details] [review]:

You should update doc/man/gnome-session.1 and document the new argument there.

::: gnome-session/main.c
@@ +281,3 @@
                 { "failsafe", 'f', 0, G_OPTION_ARG_NONE, &failsafe, N_("Do not load user-specified applications"), NULL },
                 { "version", 0, 0, G_OPTION_ARG_NONE, &show_version, N_("Version of this application"), NULL },
+                { "i-love-whale", 0, 0, G_OPTION_ARG_NONE, &please_fail, N_("Show the fail whale dialog for testing"), NULL },

--i-love-whale seems to be a little on the 'overly cute' side. Maybe just --whale ?
But not a big deal
Comment 13 Matthias Clasen 2011-08-26 14:45:21 UTC
Review of attachment 194136 [details] [review]:

This patch needs to be a few steps up, since earlier patches already include gsm-shell-extensions.h
Comment 14 Matthias Clasen 2011-08-26 14:46:22 UTC
Review of attachment 194136 [details] [review]:

This patch needs to be a few steps up, since earlier patches already include gsm-shell-extensions.h
Comment 15 Jasper St. Pierre (not reading bugmail) 2011-08-26 14:58:10 UTC
Created attachment 194842 [details] [review]
gsm: Add a flag to show the fail whale dialog on request
Comment 16 Jasper St. Pierre (not reading bugmail) 2011-08-26 14:58:19 UTC
Created attachment 194843 [details] [review]
gsm: Add debug mode to fail whale dialog

The debug mode lets you crudely debug the fail whale dialog in a window
Comment 17 Jasper St. Pierre (not reading bugmail) 2011-08-26 14:58:27 UTC
Created attachment 194844 [details] [review]
gsm: Add a new system to get information and frob Shell Extensions

This functionality will be used to allow the user to enable and disable GNOME
Shell Extensions in the fail whale dialog after a crash.
Comment 18 Jasper St. Pierre (not reading bugmail) 2011-08-26 14:58:55 UTC
Created attachment 194846 [details] [review]
gsm: Add a simple tool to dump the properties of Shell Extensions

This is just a simple test for the GsmShellExtensions code while I was developing it -- we don't have to land it.
Comment 19 Jasper St. Pierre (not reading bugmail) 2011-08-26 14:59:02 UTC
Created attachment 194847 [details] [review]
gsm: Add a UI to the fail whale for enabling and disabling Shell Extensions

When the session puts up the fail whale after a failed restart, the user now
has the opportunity to disable/enable extensions.
Comment 20 Matthias Clasen 2011-08-26 15:15:06 UTC
Looking at the dialog itself, it needs some fine-tuning:

'A problem has occurred and the system can't recover. Some extensions may be incompatible with GNOME.
Please log out and try again.'

This needs to be clearer about

a) What extensions are we talking about ? 
b) It should explain that you can turn off extensions before hitting the log out button to try again
Comment 21 Matthias Clasen 2011-08-26 15:15:36 UTC
Oh, and total nit pick: the icon shows up low-res in alt-tab
Comment 22 Matthias Clasen 2011-08-26 15:16:14 UTC
And while we are at it, we should figure out the theming problem with the prelight of the log out button.
Comment 23 Matthias Clasen 2011-08-26 15:26:01 UTC
Review of attachment 194844 [details] [review]:

::: gnome-session/gsm-shell-extensions.c
@@ +46,3 @@
+
+  if (extension->name != NULL)
+    g_free (extension->name);

g_free is NULL-safe, so do away with those ifs

@@ +57,3 @@
+ *
+ * Returns: (transfer none)
+ */

I think we don't want those empty doc comments here. They just clutter things up, and its not like this code is getting used from bindings where the annotations might justify it.

@@ +277,3 @@
+{
+  self->priv = SHELL_EXTENSIONS_PRIVATE (self);
+  self->priv->settings = g_settings_new (SHELL_SCHEMA);

Uh oh. This silently adds a hard gnome-shell dep to gnome-session. I think that is going to be problematic for a bit.
If we have to poke into the shells settings space, we should do it in a way that doesn't crash your session manager if the shell schema is not installed.

::: gnome-session/gsm-shell-extensions.h
@@ +79,3 @@
+GsmShellExtension * gsm_shell_extensions_get_for_uuid (GsmShellExtensions *self,
+                                                       gchar              *uuid);
+

It looks like the general gnome-session style is to line up headers, so please do that here.
Comment 24 Jasper St. Pierre (not reading bugmail) 2011-08-26 15:57:32 UTC
Created attachment 194857 [details] [review]
gsm: Add a new system to get information and frob Shell Extensions

This functionality will be used to allow the user to enable and disable GNOME
Shell Extensions in the fail whale dialog after a crash.



> Review of attachment 194844 [details] [review]:
>  --> (https://bugzilla.gnome.org/review?bug=656747&attachment=194844)
> 
> ::: gnome-session/gsm-shell-extensions.c
> @@ +46,3 @@
> +
> +  if (extension->name != NULL)
> +    g_free (extension->name);
> 
> g_free is NULL-safe, so do away with those ifs

easy enough.

> @@ +57,3 @@
> + *
> + * Returns: (transfer none)
> + */
> 
> I think we don't want those empty doc comments here. They just clutter things
> up, and its not like this code is getting used from bindings where the
> annotations might justify it.

sure.

> @@ +277,3 @@
> +{
> +  self->priv = SHELL_EXTENSIONS_PRIVATE (self);
> +  self->priv->settings = g_settings_new (SHELL_SCHEMA);
> 
> Uh oh. This silently adds a hard gnome-shell dep to gnome-session. I think that
> is going to be problematic for a bit.
> If we have to poke into the shells settings space, we should do it in a way
> that doesn't crash your session manager if the shell schema is not installed.

I asked desrt about this, and he just told to scan list_schemas for the
existence of the schema. So... done.

> ::: gnome-session/gsm-shell-extensions.h
> @@ +79,3 @@
> +GsmShellExtension * gsm_shell_extensions_get_for_uuid (GsmShellExtensions
> *self,
> +                                                       gchar
> *uuid);
> +
> 
> It looks like the general gnome-session style is to line up headers, so please
> do that here.

M-x align-regexp (

easy enough.
Comment 25 Matthias Clasen 2011-08-26 17:33:57 UTC
Review of attachment 194846 [details] [review]:

I must say that this feels really out of place in gnome-session. If it is wanted, put it in gnome-shell somewhere, or ship a small cmdline utility for it.
It is also unrelated to the fail whale functionality, from what I can see ?
Comment 26 Matthias Clasen 2011-08-26 17:42:54 UTC
Review of attachment 194857 [details] [review]:

This patch still needs to be reordered to before the first use of gsm-shell-extensions.h
Comment 27 Matthias Clasen 2011-08-26 17:44:24 UTC
Review of attachment 194847 [details] [review]:

Comment 20 still needs addressing (clarify the text a bit).

The only other thing that came up in irc is that we should not show the extensions unless it was actually gnome-shell that crashed. At the very minimum, don't show them if we are in fallback mode.
Comment 28 Matthias Clasen 2011-08-26 17:45:25 UTC
Review of attachment 194842 [details] [review]:

This looks fine now, being able to trigger the fail whale easily is actually very nice.
Comment 29 Matthias Clasen 2011-08-26 17:45:38 UTC
Review of attachment 194843 [details] [review]:

Looks fine now.
Comment 30 Jasper St. Pierre (not reading bugmail) 2011-08-26 20:15:50 UTC
Created attachment 194878 [details] [review]
gsm: Add a UI to the fail whale for enabling and disabling Shell Extensions

When the session puts up the fail whale after a failed restart, the user now
has the opportunity to disable/enable extensions.



Improved the text in the label a bit.
Comment 31 Jasper St. Pierre (not reading bugmail) 2011-08-26 20:15:57 UTC
Created attachment 194879 [details] [review]
gsm: Only show the extensions toggle when a session component asks for it

Session components can ask for the extension toggle with the
"X-GNOME-ShowExtensionsOnFail" key in their desktop file.



welp
Comment 32 Matthias Clasen 2011-08-26 21:05:56 UTC
Review of attachment 194879 [details] [review]:

Hmm.

This feels unnecessarily invasive to me. I mean, why do we have to do the plumbing to get this all through gsm-app and gsm-autostart-app, when we know that this is only about gnome-shell anyway ?
Comment 33 Matthias Clasen 2011-08-26 21:09:29 UTC
Review of attachment 194878 [details] [review]:

::: gnome-session/gsm-fail-whale-dialog.c
@@ +380,3 @@
+                message_label = gtk_label_new (_("A problem has occurred and the system can't recover. Some of the extensions below may have caused this.\nPlease try disabling some of the extensions below, and then log out and try again."));
+        else
+                message_label = gtk_label_new (_("A problem has occurred and the system can't recover.\nPlease log out and try again."));

Better. It would be nice to avoid the repetition of 'extensions below', though. Maybe just 'these' for the second instance ?
Comment 34 Jasper St. Pierre (not reading bugmail) 2011-08-26 21:14:04 UTC
Created attachment 194882 [details] [review]
gsm: Only show extensions UI when gnome-shell crashes

If another required component fails, it's quite useless here.
Comment 35 Jasper St. Pierre (not reading bugmail) 2011-08-26 21:14:26 UTC
(In reply to comment #32)
> Review of attachment 194879 [details] [review]:
> 
> Hmm.
> 
> This feels unnecessarily invasive to me. I mean, why do we have to do the
> plumbing to get this all through gsm-app and gsm-autostart-app, when we know
> that this is only about gnome-shell anyway ?

Because I couldn't find something as simple as g_str_equal (app_name, "gnome-shell"); as dumb as it sounds. Of course, now that I take a second glance, I find what I'm looking for.
Comment 36 Jasper St. Pierre (not reading bugmail) 2011-08-26 21:15:42 UTC
Created attachment 194883 [details] [review]
gsm: Add a UI to the fail whale for enabling and disabling Shell Extensions

When the session puts up the fail whale after a failed restart, the user now
has the opportunity to disable/enable extensions.



> ... these ...

sure.
Comment 37 Matthias Clasen 2011-08-26 22:15:47 UTC
Review of attachment 194882 [details] [review]:

Yeah, that is better.
Comment 38 Matthias Clasen 2011-08-26 22:16:38 UTC
Review of attachment 194883 [details] [review]:

Ok, good enough. This is all one big 'We suck!' dialog anyway :)
Comment 39 Matthias Clasen 2011-08-26 22:18:18 UTC
Review of attachment 194857 [details] [review]:

I guess you are going to reorder things in the right way when committing this...
Comment 40 Jasper St. Pierre (not reading bugmail) 2011-08-26 23:01:23 UTC
Attachment 194842 [details] pushed as edbf310 - gsm: Add a flag to show the fail whale dialog on request
Attachment 194843 [details] pushed as f41c07f - gsm: Add debug mode to fail whale dialog
Attachment 194857 [details] pushed as aadad23 - gsm: Add a new system to get information and frob Shell Extensions
Attachment 194882 [details] pushed as 14fa54c - gsm: Only show extensions UI when gnome-shell crashes
Attachment 194883 [details] pushed as 0b80e1a - gsm: Add a UI to the fail whale for enabling and disabling Shell Extensions