AllTray needs X Session Management support

Bug #286577 reported by cristinel mazarine on 2008-10-20
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
AllTray
Wishlist
Unassigned
alltray (Ubuntu)
Wishlist
Unassigned

Bug Description

Binary package hint: alltray

Steps:
1. Create a button icon and assign the command: "alltray -na -s -l thunderbird -i thunderbird %u"
2. Click on button and wait until thunderbird is visible.
3. Close thunderbird from "close" button (to minimize to tray) - this is ok, as expected.
4. Restart kubuntu
5. Log in and:
5.1. check that thunderbird is not visible (as window in desktop or as icon into tray) - this is not ok, expected icon in tray
5.2. check that thunderbird process is started
5.3. start again thunderbird from the button icon created at step 1.
5.4. repeat the step 3 (close from "close" button) and check the tray - thunderbird is not there (this is not ok)
5.5. check the processes and see that thunderbird process is not running.

Notes: bug reproduced on:
Notebook Fujitsu Siemens V5545
Linux version 2.6.24-19-generic (buildd@king) (gcc version 4.2.3 (Ubuntu 4.2.3-2ubuntu7)) #1 SMP Wed Aug 20 17:53:40 UTC 2008
Qt: 3.3.8b
KDE: 3.5.10
KDE Daemon: $Id: kded.cpp 711061 2007-09-11 09:42:51Z tpatzig $
AllTray Version 0.69

dpkg -S alltray
alltray: /usr/lib/liballtray.so
alltray: /usr/share/applications/alltray.desktop
alltray: /usr/bin/alltray
app-install-data: /usr/share/app-install/desktop/alltray.desktop
alltray: /usr/share/pixmaps/alltray.png
alltray: /usr/share/doc/alltray/changelog.gz
alltray: /usr/share/man/man1/alltray.1.gz
alltray: /usr/share/doc/alltray/README
app-install-data: /usr/share/app-install/icons/alltray.png
alltray: /usr/share/doc/alltray/changelog.Debian.gz
alltray: /usr/share/lintian/overrides/alltray
alltray: /usr/share/doc/alltray/README.Debian
alltray: /usr/share/doc/alltray
alltray: /usr/lib/liballtray.so.0
alltray: /usr/lib/liballtray.so.0.0.0
alltray: /usr/lib/liballtray.la
alltray: /usr/share/linda/overrides/alltray
alltray: /usr/share/doc/alltray/copyright

lsb_release -rd
Description: Ubuntu 8.04.1
Release: 8.04

apt-cache policy alltray
alltray:
  Installed: 0.69-1ubuntu1
  Candidate: 0.69-1ubuntu1
  Version table:
 *** 0.69-1ubuntu1 0
        500 http://archive.ubuntu.com hardy/universe Packages
        100 /var/lib/dpkg/status

On Mon, 20 Oct 2008 19:38:18 -0000
cristinel mazarine <email address hidden> wrote:

> Public bug reported:
>
> Binary package hint: alltray
>
> Steps:
> 1. Create a button icon and assign the command: "alltray -na -s -l
> thunderbird -i thunderbird %u" 2. Click on button and wait until
> thunderbird is visible. 3. Close thunderbird from "close" button (to
> minimize to tray) - this is ok, as expected. 4. Restart kubuntu
> 5. Log in and:
> 5.1. check that thunderbird is not visible (as window in desktop or
> as icon into tray) - this is not ok, expected icon in tray
> 5.2. check that thunderbird process is started 5.3. start again
> thunderbird from the button icon created at step 1. 5.4. repeat the
> step 3 (close from "close" button) and check the tray - thunderbird
> is not there (this is not ok) 5.5. check the processes and see that
> thunderbird process is not running.

I don't understand the bug. Upon restart, why is Thunderbird running?
Do you have some sort of session-save preference enabled in KDE?

If that is the case, I am going to guess that this is because
Thunderbird registers something with KDE and AllTray does not. I can
attempt to see if this is a cross-desktop issue a bit later when I have
some time.

Since Thunderbird is already running as per 5.2, when you execute 5.3,
strange things will happen if Thunderbird detects it's already
running. It won't create a new window, so AllTray will have nothing to
hook into, this is unavoidable. I don't understand how 5.3 and 5.4
lead to 5.5 (Thunderbird not running).

I would suspect that if you put the command "alltray -na -s -l
thunderbird -i thunderbird" in your startup items (on GNOME, at least,
this is System→Preferences→Sessions in the "Startup Programs" tab), it
will work as you expect. Can you confirm that, if there is such an
equivalent in KDE?

 --- Mike

--
My sigfile ran away and is on hiatus.

cristinel mazarine (cristinel) wrote :

Hello Mr Michael Trausch,

In Kubuntu I have enabled "restore previous session on login".

"
/*[...]
*/

/*If that is the case, I am going to guess that this is because Thunderbird registers something with KDE and AllTray does not.
[...]
*/

"
I think that this is the problem.
I presume that "restore previous session" is done by saving the running
applications into a list and launching them back when log-in is performed.

AllTray should check if "restore previous session" flag is set and if it
is, should change the start-up command of each owned application which
is running when log-off is performed (/owned application = application
started through alltray/) .

"
/*[...]
*/

/*I don't understand how 5.3 and 5.4
lead to 5.5 (Thunderbird not running).
[...]
*/

"
Is not 5.3 an 5.4 is 5.4 = 3.0. Close the thunderbird from "close"
button and see that thunderbird process is not running, which means that
tunderbird was not started through alltray.

--

*Cristinel Mazarine*
Team Lead
+4 01 627 16 82 office
+4 0743 104 850 mobile

*Crom-Osec, SRL.*
Fundeni 2
Bucharest, RO *
www.osec.ro* <http://www.osec.ro/>

Michael B. Trausch wrote:
> On Mon, 20 Oct 2008 19:38:18 -0000
> cristinel mazarine <email address hidden> wrote:
>
>
>> Public bug reported:
>>
>> Binary package hint: alltray
>>
>> Steps:
>> 1. Create a button icon and assign the command: "alltray -na -s -l
>> thunderbird -i thunderbird %u" 2. Click on button and wait until
>> thunderbird is visible. 3. Close thunderbird from "close" button (to
>> minimize to tray) - this is ok, as expected. 4. Restart kubuntu
>> 5. Log in and:
>> 5.1. check that thunderbird is not visible (as window in desktop or
>> as icon into tray) - this is not ok, expected icon in tray
>> 5.2. check that thunderbird process is started 5.3. start again
>> thunderbird from the button icon created at step 1. 5.4. repeat the
>> step 3 (close from "close" button) and check the tray - thunderbird
>> is not there (this is not ok) 5.5. check the processes and see that
>> thunderbird process is not running.
>>
>
> I don't understand the bug. Upon restart, why is Thunderbird running?
> Do you have some sort of session-save preference enabled in KDE?
>
> If that is the case, I am going to guess that this is because
> Thunderbird registers something with KDE and AllTray does not. I can
> attempt to see if this is a cross-desktop issue a bit later when I have
> some time.
>
> Since Thunderbird is already running as per 5.2, when you execute 5.3,
> strange things will happen if Thunderbird detects it's already
> running. It won't create a new window, so AllTray will have nothing to
> hook into, this is unavoidable. I don't understand how 5.3 and 5.4
> lead to 5.5 (Thunderbird not running).
>
> I would suspect that if you put the command "alltray -na -s -l
> thunderbird -i thunderbird" in your startup items (on GNOME, at least,
> this is System→Preferences→Sessions in the "Startup Programs" tab), it
> will work as you expect. Can you confirm that, if there is such an
> equivalent in KDE?
>
> --- Mike
>
>

In Kubuntu I have enabled "restore previous session on login".

[...]
If that is the case, I am going to guess that this is because Thunderbird registers something with KDE and AllTray does not.
[...]
I think that this is the problem.
I presume that "restore previous session" is done by saving the running applications into a list and launching them back when log-in is performed.

AllTray should check if "restore previous session" flag is set and if it is, should change the start-up command of each owned application which is running when log-off is performed (owned application = application started through alltray) .

[...]
I don't understand how 5.3 and 5.4
lead to 5.5 (Thunderbird not running).
[...]
Is not 5.3 an 5.4 is 5.4 = 3.0. Close the thunderbird from "close" button and see that thunderbird process is not running, which means that tunderbird was not started through alltray.

  status wishlist
  importance low
  done

Ahh, I see now. I mis-read that the first time through.

The problem is that Thunderbird appears to connect to the session
manager using the X Session Management Protocol. KDE implements a
session manager server that implements the XSMP (as does GNOME). What
this means is that Thunderbird is directly registering to the session
manager, and so its state is preserved.

This would not appear to be an easy bug to fix, honestly. In order for
it to be fixed, AllTray would need to become a session manager
_itself_, for its clients (thus intercepting their calls to the
session manager which are otherwise received by ksmserver or
gnome-session), and register to the system session manager regarding its
own state.

I'll leave this bug open for the time being as a wishlist item, and do
some research into what it would take to make it happen properly.
Thank you for your bug report!

 --- Mike

--
My sigfile ran away and is on hiatus.

Michael B. Trausch (mtrausch) wrote :

  status confirmed
  importance wishlist
  done

Ahh, I see now. I mis-read that the first time through.

The problem is that Thunderbird appears to connect to the session
manager using the X Session Management Protocol. KDE implements a
session manager server that implements the XSMP (as does GNOME). What
this means is that Thunderbird is directly registering to the session
manager, and so its state is preserved.

This would not appear to be an easy bug to fix, honestly. In order
for it to be fixed, AllTray would need to become a session manager
_itself_, for its clients (thus intercepting their calls to the
session manager which are otherwise received by ksmserver or
gnome-session), and register to the system session manager regarding
its own state.

I'll leave this bug open for the time being as a wishlist item, and do
some research into what it would take to make it happen properly.
Thank you for your bug report!

 --- Mike

--
My sigfile ran away and is on hiatus.

Changed in alltray:
importance: Low → Wishlist
status: New → Confirmed
cristinel mazarine (cristinel) wrote :

Thank you for looking into this.

--

*Cristinel Mazarine*
Team Lead
+4 01 627 16 82 office
+4 0743 104 850 mobile

*Crom-Osec, SRL.*
Fundeni 2
Bucharest, RO *
www.osec.ro* <http://www.osec.ro/>

cristinel mazarine (cristinel) wrote :

Here is a limited workaround:

1. Open "System Settings" > "Advanced" > "Session Manager"
2. Add in the edit from "Aplications to be excluded from session" the
following
thunderbird-bin:alltray

In this way, on next log-in thunderbird will start normally.

--

*Cristinel Mazarine*
Team Lead
+4 01 627 16 82 office
+4 0743 104 850 mobile

*Crom-Osec, SRL.*
Fundeni 2
Bucharest, RO *
www.osec.ro* <http://www.osec.ro/>

Changed in alltray:
importance: Undecided → Wishlist
milestone: none → alltray-0.8.0
status: New → Confirmed
summary: - invalid application state after system restart
+ AllTray needs X Session Management support
Changed in alltray:
importance: Wishlist → Low
Michael B. Trausch (mtrausch) wrote :

Dropping milestone because I'm not sure if this feature will actually make it in for 0.8.0. It may be backported to 0.8.x after it is complete and stable, though.

Changed in alltray:
importance: Low → Wishlist
milestone: 0.8.0 → none
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers