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 645539 - Do not always restart saved required components
Do not always restart saved required components
Status: RESOLVED OBSOLETE
Product: gnome-session
Classification: Core
Component: gnome-session
2.91.x
Other Linux
: Normal normal
: ---
Assigned To: Session Maintainers
Session Maintainers
: 642454 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2011-03-22 15:25 UTC by Vincent Untz
Modified: 2021-06-14 18:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch that implements Colins proposal (1.08 KB, patch)
2011-04-27 16:36 UTC, Matthias Clasen
none Details | Review
new patch (2.04 KB, patch)
2011-04-28 00:57 UTC, Matthias Clasen
reviewed Details | Review

Description Vincent Untz 2011-03-22 15:25:04 UTC
Required components saved in a saved session should only be restarted if the newly started session also requires this component in some way.

Example:
 1) Session A requires component XYZ. Session A is saved.
 2) Session B does not require component XYZ, and has nothing that conflicts (via provides) with XYZ
 3) If session B starts, then XYZ is started too. Which is not wanted.

How to fix this:
 1) add a X-GNOME-Autostart-RequiredBySession key to saved .desktop file, with "A" (name of session) as value
 2) when adding saved apps from saved session on startup, check if X-GNOME-Autostart-RequiredBySession is set. If it's set and the name is the one of the current session, use it. If it's set and the name is different, then don't use it but keep the .desktop around in case we have the same app started via autostart later on.
Comment 1 Vincent Untz 2011-03-22 15:26:20 UTC
Note: it doesn't affect our default gnome/gnome-fallback setup because components in one conflicts with components in the other ones (shell vs panel & metacity), or are not saved anyway (notification-daemon).
Comment 2 Colin Walters 2011-04-27 16:10:19 UTC
One option is to change the key name we use to read/save the session; this avoids loading old saved sessions that may have e.g. metacity in them when upgrading to GNOME 3.

Concretely we change in the code the return value gsm_util_get_saved_session_dir  to ~/.config/gnome-session/saved-session-3 or something.
Comment 3 Matthias Clasen 2011-04-27 16:36:06 UTC
Created attachment 186754 [details] [review]
patch that implements Colins proposal
Comment 4 Colin Walters 2011-04-27 19:12:27 UTC
(In reply to comment #3)
> Created an attachment (id=186754) [details] [review]
> patch that implements Colins proposal

I'm fine with this; the risk of breakage seems to me to be very low, and we know reading old saved sessions causes problem.s

But did you get a chance to actually test it?  Someone should before we commit this.

Could also use a comment in the code linking to this bug (yeah, you can git annotate, but if code moves around you have to dig harder).
Comment 5 Matthias Clasen 2011-04-28 00:57:13 UTC
Created attachment 186786 [details] [review]
new patch

Next iteration adds a bug ref to the code, and updates the man page to refer to the new location, too.
Comment 6 Colin Walters 2011-04-28 14:30:11 UTC
Review of attachment 186786 [details] [review]:

This looks good to me.  Would still like a comment from Vincent though too.
Comment 7 Maciej (Matthew) Piechotka 2013-08-07 14:19:30 UTC
*** Bug 642454 has been marked as a duplicate of this bug. ***
Comment 8 André Klapper 2021-06-14 18:22:49 UTC
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org.
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org
which have not seen updates for a longer time (resources are unfortunately
quite limited so not every ticket can get handled).

If you can still reproduce the situation described in this ticket in a recent
and supported software version of gnome-session, then please follow
  https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines
and create a new ticket at
  https://gitlab.gnome.org/GNOME/gnome-session/-/issues/

Thank you for your understanding and your help.