3

The title says it all. I don't want that applet because when I'm in an environment where wifi is of poor quality, it has the very annoying tendency to popup windows that interrupt other activities, such as playing games full screen. My network manager configuration is OK, thank you nm-applet, so shut up, please.

My current solution is to kill the nm-applet process. This isn't good practice however, and should not start in the first place. I could remove the package too, but it's not a good solution either since I still may want to use it sometimes, and uninstalling/reinstalling each and every time is really ugly, as well as fiddling with the package files such as clearing the execute bit or renaming, which makes for a package-inconsistent install.

I've tried copying /etc/xdg/autostart/nm-applet.desktop to ~/.config/autostart, and :

  • Setting NotShowIn=KDE;GNOME;GNOME-Flashback; => no luck
  • Setting X-GNOME-Autostart-enabled=false => no luck
  • ln -s /dev/null ~/.config/autostart/nm-applet.desktop => no luck

Hence my guess is, it's not started from /etc/xdg/autostart.

I tried gsettings set org.gnome.nm-applet show-applet false, no luck either. I thought it was very much self-explanatory and would work, but no.

To be more precise, I use the session that's named GNOME Flashback (Metacity) in the GDM login screen.

Any advices ? Is it hardcoded or what ?

SOLVED :

Thanks to the answer below, I found the file is indeed in the autostart directory, but not the one I was looking. However, rather that modifying the file itself, I copied it in ~/.config/autostart and appended X-GNOME-Autostart-enabled=false. The answerer's method applies system-wide, and my method works for the current user only.

NovHak
  • 579
  • 2
  • 14

1 Answers1

3

for system-wide:

Please note the valuable comments from Experts

You should not edit files directly inside /etc/xdg/autostart directory by hand. It is a bad idea, bad method and bad recommendation. It will be overwritten on next package update. Instead - copy this file to ~/.config/autostart and then edit it for your needs. Or use GNOME GUI tool for startup applications (gnome-session-properties).

Open the file gnome-flashback-nm-applet.desktop with below command

sudo -H gedit /etc/xdg/autostart/gnome-flashback-nm-applet.desktop

and edit the content like below

[Desktop Entry]
Name=Network (GNOME Flashback)
Comment=Manage your network connections
# TRANSLATORS: Don't translate this text (this is icon name)
Icon=nm-device-wireless
Exec=nm-applet
TryExec=nm-applet
Terminal=false
Type=Application
NoDisplay=true
OnlyShowIn=noGNOME-Flashback; ### I have changed this line. ###
X-GNOME-UsesNotifications=true
X-Ubuntu-Gettext-Domain=gnome-flashback

for user only:

cp /etc/xdg/autostart/gnome-flashback-nm-applet.desktop ~/.config/autostart/

and edit the file ~/.config/autostart/gnome-flashback-nm-applet like below

[Desktop Entry]
Name=Network (GNOME Flashback)
Comment=Manage your network connections
# TRANSLATORS: Don't translate this text (this is icon name)
Icon=nm-device-wireless
Exec=nm-applet
TryExec=nm-applet
Terminal=false
Type=Application
NoDisplay=true
OnlyShowIn=noGNOME-Flashback; ### I have changed this line. ###
X-GNOME-UsesNotifications=true
X-Ubuntu-Gettext-Domain=gnome-flashback

enter image description here

enter image description here

PRATAP
  • 21,989
  • 8
  • 59
  • 121
  • Heck, how did I miss this one ? I was not expecting a Flashback-specific entry for nm-applet in the autostart directory. Anyway it works, thanks ! – NovHak Jan 22 '20 at 18:17
  • You should not edit files directly inside */etc/xdg/autostart* directory by hand. It is a bad idea, bad method and bad recommendation. It will be overwritten on next [package](https://packages.ubuntu.com/search?searchon=contents&keywords=gnome-flashback-nm-applet.desktop&mode=exactfilename&suite=eoan&arch=any) update. Instead - copy this file to *~/.config/autostart* and then edit it for your needs. Or use GNOME GUI tool for startup applications (`gnome-session-properties`). – N0rbert Jan 22 '20 at 18:48
  • 1
    @N0rbert While I agree with you essentially, the answerer is not _that_ wrong. If one wants the default behaviour to be altered system-wide, it's the way to go. In the Debian packaging system, files belonging to a package should not be altered, with the exception of configuration files, which is the case here (have a look at `/var/lib/dpkg/info/gnome-session-flashback.conffiles`). – NovHak Jan 22 '20 at 19:43
  • Upon system upgrade however, it's likely that the operator would be asked if he wants to keep the config file in place, or replace it with the package maintainer's version, in which case choosing the maintainer's version is highly recommended. – NovHak Jan 22 '20 at 19:45
  • 2
    @NovHak I agree with you and I'm keeping in mind all the aspects you have described. I wrote my comment to ask answerer to use best practices for single user. – N0rbert Jan 22 '20 at 19:49