Version: 0.9 (using KDE 4.7.2) OS: Linux I configure the notifications dialog in systemsetting to start a shell script when a network connection is established. This works as expected. After booting and logon to KDE a network connection is active too, but my script is not started. When I disconnect and connect again, my script is executed. This Problem only exists after booting. Reproducible: Always Steps to Reproduce: Set notifications to execute a script after connecting successfully. Reboot. Actual Results: Script is not executed. Expected Results: Script should be executed.
Recent Plasma NM versions only start to report notifications *after* the plasmoid is started, but connections can be initiated earlier than that. If the connection is already initiated when you logon then there will be no notification.
But the connection is only configured in the NM (static IP, special DNS) and only the current user is allowed to use this connection (no system connection). So it shouldn't be possible to connect successfully other then via NM, is it?
Being more clearer, there two things that can cause this problem: 1. The fact that connection are started earlier in KDE opening session process (even before the splash screen appears), but Plasma NM's notifications only appear after the plasmoid is started, which takes several seconds after the opening session has started. 2. The connection was started before logging on a KDE session. Case #1 seems to be the cause of your problem. I need to figure out a way to enable non-visual notifications until the plasmoid is started or queue the notifications to run after the plasmoid is started. Until then you can use NetworkManager's /etc/NetworkManager/dispatcher.d/ to start your script. The script will be run on root's behalf, so you must use 'su -c' to run it was the user you wish. The scripts there are executed when the connection is established and when it is disconnected.
Ok. Thanks for your explanation. Seems like point 1 causes the problem, so I'll use a script in the dispatcher directory. I understood that this bug is caused by the behaviour of KDE and not the NM. But from my point of view it's still a bug (maybe of another component) … when I set notification to start a script, I want this in every case, not only in some.
Git commit 48c0936d67e24b897d7d12e935bdd82628a2bb86 by Lamarque V. Souza. Committed on 06/11/2011 at 01:12. Pushed by lvsouza into branch 'master'. Delay kded module initialization until the plasmoid is fully operational. This make the notification manager catches all notifications. BUG: 285309 FIXED-IN: 0.9.1_rc1 M +4 -3 applet/networkmanager.cpp M +43 -41 kded/service.cpp http://commits.kde.org/networkmanagement/48c0936d67e24b897d7d12e935bdd82628a2bb86