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 648828 - libmutter conversion broke session saving
libmutter conversion broke session saving
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
: 591730 634761 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2011-04-28 01:57 UTC by Matthias Clasen
Modified: 2013-12-21 17:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
fix session saving for gnome-shell (1.39 KB, patch)
2011-04-28 01:57 UTC, Matthias Clasen
reviewed Details | Review

Description Matthias Clasen 2011-04-28 01:57:59 UTC
Created attachment 186789 [details] [review]
fix session saving for gnome-shell

After the libmutter conversion, gnome-shell is now started as /usr/bin/gnome-shell, but mutter still hardcodes the 'mutter' binary name in its restart command.

The consequence is that after saving your session once, you get a plugin-less mutter the next time you log in.

Here is a simple patch that works for me. It replaces hardcoded instances of "mutter" in session saving with g_get_prgname().
Comment 1 Colin Walters 2011-04-28 17:00:50 UTC
Review of attachment 186789 [details] [review]:

One minor comment.

::: mutter-3.0.1/src/core/session.c.save
@@ +311,3 @@
+    char *prgname;
+
+    prgname = g_get_prgname ();

Hm, why isn't g_get_prgname() const in glib?  Anyways you should use "const" on the variable at least.
Comment 2 Matthias Clasen 2011-04-28 20:47:57 UTC
If I use const on the variable, the compiler bitches, because all the fields in the libSM structs we fill in are not...
Comment 3 Colin Walters 2011-04-28 21:32:46 UTC
(In reply to comment #2)
> If I use const on the variable, the compiler bitches, because all the fields in
> the libSM structs we fill in are not...

Oh, yeah; but you can cast those back.  That's a normal thing to do I think when dealing with C arrays of char *, since "const char * const *" is annoying...

I don't care a lot, feel free to push as is.  Though I *am* curious why the GLib function isn't const.
Comment 4 Matthias Clasen 2011-04-29 11:25:30 UTC
Pushed with the const
Comment 5 Dan Winship 2011-04-29 17:06:40 UTC
*** Bug 634761 has been marked as a duplicate of this bug. ***
Comment 6 Ray Strode [halfline] 2013-12-21 17:47:29 UTC
*** Bug 591730 has been marked as a duplicate of this bug. ***