Bug 222296

Summary: kde 4.4rc1: session restore restores wrong program
Product: [Unmaintained] kmail Reporter: Arkadiusz Miskiewicz <arekm>
Component: generalAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED INTENTIONAL    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Unspecified   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Arkadiusz Miskiewicz 2010-01-11 22:31:18 UTC
Version:            (using Devel)
Installed from:    Compiled sources

I run kmail (not kontact) under kde 4.4 rc1. Then I restart kdm. Log into my account again and kde restores session but instead of restoring kmail it restores whole kontact.

This was working fine in kde 4.3.
Comment 1 Thomas McGuire 2010-02-05 11:05:25 UTC
I think this is of revision r1032869.

This is most likely because you are using the Kolab resource. As soon as anything at KDE startup requests contacts, KMail needs to be started.
We changed that to start Kontact instead now, as people using Kolab or another IMAP KResource are more likely to use Kontact.

This situation is suboptimal, but can't really be changed until Kontact is based on Akonadi.
Comment 2 Arkadiusz Miskiewicz 2010-02-05 15:13:49 UTC
Is kolab resource a "eGroupware" resource? I'm looking at akonadi resource configuration tool and there is no kolab resource here while egroupware is not configured.

I also disabled restoring kde session but still kontact starts ;/ (which I have to kill and start just kmail every time)
Comment 3 Thomas McGuire 2010-02-05 19:51:02 UTC
> Is kolab resource a "eGroupware" resource?
Actually Kolab was just an example, I meant all resources accessing IMAP over KMail. I don't know if eGroupware does that, could be that it triggers Kontact starting as well.

> I'm looking at akonadi resource configuration tool
For now, you have to look in the KResource configuration, until everything is fully ported to Akonadi.
Start "kcmshell4 kresources" to configure those.
Comment 4 Ingo Klöcker 2010-02-05 21:11:43 UTC
Here is what I do to prevent Kontact from being started if a resource requiring the IMAP backend is used:

1.) Open Kontact.desktop and remove the line
X-KDE-ServiceTypes=DBUS/ResourceBackend/IMAP

2.) Open KMail.desktop and change the line
X-KDE-ServiceTypes=DBUS/Mailer
to
X-KDE-ServiceTypes=DBUS/Mailer,DBUS/ResourceBackend/IMAP