On 02/03/18 05:05, Stefan Seyfried wrote:
Hi,
I installed todays Leap 15 snapshot in a VM and -- again -- was slightly annoyed, that nm-applet was started in the xfce desktop even though NetworkManager is not running at all.
Now the /etc/xdg/autostart/nm-applet.desktop file that causes it to start in every desktop but GNOME and KDE is static, and AFAICT .desktop files have no notion of dependencies.
Then I got an idea:
some service during system boot (early boot) that basically does
if systemctl is-enabled NetworkManager; then ln -s /usr/share/applications/nm-applet.desktop \ /etc/xdg/autostart/nm-applet.desktop 2>/dev/null else rm -f /etc/xdg/autostart/nm-applet.desktop fi
and just not include /etc/xdg/autostart/nm-applet.desktop (or as %ghost) in the nm-applet package.
In enlightenment we were doing this manually at firstrun if Network Manager is enabled add nm-applet to autostart, but enlightenment makes it easy to write first run code. The problem with the approach your suggesting is desktops like KDE don't use nm-applet but will still show it if it is running. So we don't really want a service to do that, unless it can be run as a user service and also check the desktop the user is using. -- Simon Lees (Simotek) http://simotek.net Emergency Update Team keybase.io/simotek SUSE Linux Adelaide Australia, UTC+10:30 GPG Fingerprint: 5B87 DB9D 88DC F606 E489 CEC5 0922 C246 02F0 014B