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 533537 - Tomboy applet shouldn't connect to session manager
Tomboy applet shouldn't connect to session manager
Status: RESOLVED FIXED
Product: tomboy
Classification: Applications
Component: General
0.11.x
Other Linux
: High major
: ---
Assigned To: Tomboy Maintainers
Tomboy Maintainers
: 581839 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2008-05-17 09:07 UTC by Lucas Rocha
Modified: 2009-10-04 00:48 UTC
See Also:
GNOME target: ---
GNOME version: 2.23/2.24


Attachments
Proposed patch (1013 bytes, patch)
2009-03-14 16:44 UTC, Sandy Armstrong
rejected Details | Review

Description Lucas Rocha 2008-05-17 09:07:40 UTC
As a general rule, applets shouldn't connect to session manager as they're already managed by gnome-panel. Tomboy should only connect to session when started as a standalone app.
Comment 1 Sandy Armstrong 2009-03-02 23:10:45 UTC
I'm not sure if this bug is still valid considering some refactoring we've done.  Also, I'm not really sure how to test if I have connected to the session.  If "tomboy" shows up under "Currently running programs" in the "Current Session" tab of Session Preferences, do that mean it has connected to the session?  I see hamster in there but not gnome-main-menu.

Looks like the only thing we do as an applet is this:

  // Register handler for saving session when logging out of Gnome
  Gnome.Client client = Gnome.Global.MasterClient ();
  client.SaveYourself += OnSaveYourself;

Is even this considered connecting to the session?

Thanks for your help!
Comment 2 Matthias Clasen 2009-03-04 03:53:45 UTC
Yes, this is connecting to the session, and yes, this is inappropriate for applets. It causes tomboy to be started twice when resuming a session (once from the panel config, and then by the session manager), and for some reason, that causes it to pop up the search window.

A simple workaround that I am going to put into Fedora now is to unset the SESSION_MANAGER envvar in tomboy-panel before execing tomboy.
Comment 3 Sandy Armstrong 2009-03-04 06:10:32 UTC
Thanks Matthias. I'll try to get this fixed before code freeze.

The reason the Search window pops up is because when Tomboy detects it is already running, it brings up the Search UI (to help with the common case of a user not realizing that Tomboy runs in their panel/tray, and attempting to summon it via the GNOME main menu).
Comment 4 Sandy Armstrong 2009-03-14 16:44:36 UTC
Created attachment 130670 [details] [review]
Proposed patch

Move session saving code to RegisterSessionManagerRestart method (seems like a good place, ya?).

Setting up a GNOME 2.25.x environment so I can test.  Trying to help move bug #552387 along.
Comment 5 Sandy Armstrong 2009-03-15 20:35:33 UTC
So that patch doesn't really cut it.  I have another one that's a bit more thorough but it doesn't really matter.  Need to do the equivalent of Matthias' work-around or else Tomboy automatically becomes part of the session.

Can just add --sm-disable to Tomboy exec command in tomboy-panel.

The problem with this is that then, if you have session save enabled, and you have Tomboy windows open when you log out, you get an annoying "are you sure" dialog letting you know that the Tomboy windows aren't part of the session.

Not happy with this solution.
Comment 6 Sandy Armstrong 2009-05-08 12:49:17 UTC
*** Bug 581839 has been marked as a duplicate of this bug. ***
Comment 7 Sandy Armstrong 2009-07-19 15:16:00 UTC
Session save appears to be fixed in Ubuntu Jaunty and other recent distro releases. When enabled by Tomboy panel applet users, OAFIID message often appears because GNOME session is starting Tomboy in the tray before the panel applet is started.

This is really ugly, we need a better fix ASAP.  Would love for somebody on Jaunty or another affected distro to test out a solution that works well given the issues I raised in comment #5.
Comment 8 Jay Cassano 2009-08-09 13:54:42 UTC
I noticed this a while back in Tomboy and just stopped using Save Session. I just had a similar problem to this when using Glipper*, except that it happened everytime I started Glipper - not just save session. The issue with Glipper was that it would always start before the panel started. By adding a simple timed delay to Glipper starting up (see the workaround here: https://bugs.launchpad.net/ubuntu/+source/glipper/+bug/213494 ) its stopped Glipper from launching before the panel. I wonder if the same logic would apply here. Not an ideal solution, but maybe it would work?

The proposed workaround says 8 seconds but since my session loads slowly I delay 30 seconds and it's not noticeable to me.

*Yes, Glipper is no longer actively maintained AFAIK but I think the same logic still applies here for Tomboy, unless I misunderstood something in Comment #5.
Comment 9 Sandy Armstrong 2009-09-07 21:17:49 UTC
Upon testing again in Ubuntu Jaunty, the problem I mentioned with --sm-disable (a warning when logging out with Tomboy windows open) does not seem to exist.  Assuming this is the same upstream, I'm going to apply that fix and close this bug.

Hopefully folks will try today's release out on various distros and let me know how it goes.
Comment 10 Sandy Armstrong 2009-09-08 00:12:39 UTC
Fixed in 0.15.7.  I've only tested the fix in an Ubuntu Jaunty VM (and openSUSE 11.1 where session save is broken afaik, since it's GNOME 2.24).

Please try it out on your favorite distro so we can make sure the upcoming stable release has the right fix.