GNOME Bugzilla – Bug 648828
libmutter conversion broke session saving
Last modified: 2013-12-21 17:47:29 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().
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.
If I use const on the variable, the compiler bitches, because all the fields in the libSM structs we fill in are not...
(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.
Pushed with the const
*** Bug 634761 has been marked as a duplicate of this bug. ***
*** Bug 591730 has been marked as a duplicate of this bug. ***