Bug 205529

Summary: /usr/lib/nwam-manager is started multiple times
Product: [Plasma] ksmserver Reporter: Jan Hnatek <jan.hnatek>
Component: generalAssignee: Lubos Lunak <l.lunak>
Status: RESOLVED NOT A BUG    
Severity: normal CC: tropikhajma
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Solaris   
Latest Commit: Version Fixed In:
Attachments: An example of the problem.

Description Jan Hnatek 2009-08-28 21:58:41 UTC
Version:            (using KDE 4.3.0)
Compiler:          Sun Studio 12 update 1 
OS:                Solaris
Installed from:    Compiled From Sources

On OpenSolaris, starting KDE4 session often results in having multiple instances of /usr/lib/nwam-manager (OpenSolaris Network Auto-Magic manager / tray icon). The number of these instances varies.

Guessing that one instance is automatically started from /etc/xdg/autostart/nwam-manager.desktop, others possibly from restored session?


$ cat /etc/xdg/autostart/nwam-manager.desktop
[Desktop Entry]
Encoding=UTF-8
Name=Network Auto-magic Manager applet
Comment=Show network status and config network
Icon=network-location
Exec=/usr/lib/nwam-manager
Terminal=false
Type=Application
Categories=
X-GNOME-Autostart-enabled=true

Any hints at the root of this problem?
Comment 1 Jan Hnatek 2009-08-28 22:01:25 UTC
Created attachment 36544 [details]
An example of the problem.

It can get as bad as this, though normally it's 2-3 instances.
Comment 2 Lubos Lunak 2009-09-09 14:19:43 UTC
Either use autostart or session management, do not mix both. See e.g. 'RestartStyleHint' in http://www.xfree86.org/current/xsmp.pdf .
Comment 3 Jan Hnatek 2009-10-05 23:09:15 UTC
Thanks for the hint.
It is as described above, one instance is started from /etc/xdg/autostart (opensnoop):
kdeinit4      14 /etc/xdg/autostart/nwam-manager.desktop

and other instances get saved by session management:
./share/config/ksmserverrc:program6=nwam-manager
./share/config/ksmserverrc:restartCommand6=/usr/lib/nwam-manager,--sm-config-prefix,[snip]

Since removing the nwam-manager.desktop file would probably break this functionality for GNOME sessions, the best is to add 'nwam-manager' to the list of applications excluded from KDE session management.

This can be done in: systemsettings -> Advanced -> Session Manager
or in the following file:
$ grep -2 nwam ~/.kde/share/config/ksmserverrc
[General]
confirmLogout=true
excludeApps=nwam-manager
loginMode=restorePreviousLogout
offerShutdown=true