Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nixos/nm-applet: starts the applet with Appindicator support #98004

Merged
merged 2 commits into from Sep 15, 2020
Merged

nixos/nm-applet: starts the applet with Appindicator support #98004

merged 2 commits into from Sep 15, 2020

Conversation

romildo
Copy link
Contributor

@romildo romildo commented Sep 14, 2020

Motivation for this change

As of version 1.18.0 Appindicator support is available in the official network-manager-applet package. To use nm-applet in an Appindicator environment the applet should be started with the following command:

$ nm-applet --indicator

Without this option it does not appear in the Enlightenment panel systray, for instance. (edited)

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

Copy link
Contributor

@worldofpeace worldofpeace left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the difference if this is used in an environment without appindicator support?
For example, I don't need this in Pantheon. Should this instead be turned into an option?

@romildo
Copy link
Contributor Author

romildo commented Sep 14, 2020

What is the difference if this is used in an environment without appindicator support?
For example, I don't need this in Pantheon. Should this instead be turned into an option?

(I have edited your message above by accident :( but restored it from the e-mail, sorry)

I have tested on Fluxbox, Awesome, Xfce, Mate and Enlightenment. Works normally on all of them with the --indicator. My conclusion is that it does not need to be a module option. It can always be turned on.

@worldofpeace
Copy link
Contributor

worldofpeace commented Sep 14, 2020

What is the difference if this is used in an environment without appindicator support?
For example, I don't need this in Pantheon. Should this instead be turned into an option?

(I have edited your message above by accident :( but restored it from the e-mail, sorry)

I have tested on Fluxbox, Awesome, Xfce, Mate and Enlightenment. Works normally on all of them with the --indicator. My conclusion is that it does not need to be a module option. It can always be turned on.

I believe it for sure requires appindicator support to exist somewhere in the DE, and what I meant was there are desktops that I believe don't need it. According to git log at GNOME/network-manager-applet@be72dcb the --indicator flag is intended to be a feature where you can "switch between indicator and status icon at runtime". So this change would always force it to use the indicator, but maybe someone wants to use the status icon. It seems to be configurable in that manner that I think it should have an option, but we could probably turn it on by default.

@romildo
Copy link
Contributor Author

romildo commented Sep 14, 2020

Regarding Pantheon and nm-applet, it is not clear to me that Pantheon is making any use of nm-applet, although it is started in https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/services/x11/desktop-managers/pantheon.nix#L242.

The network indicator in Pantheon pane looks different from nm-applet, and it does not go away and still works after killing nm-applet.

Would it be possible that Pantheon has its own network indicator and do not use nm-applet?

Screenshot from 2020-09-14 19 51 39

As of version 1.18.0 Appindicator support is available in the official
network-manager-applet package. To use nm-applet in an Appindicator
environment the applet should be started  with the following command:

$ nm-applet --indicator

Without this option it does appear in the Enlightenment panel systray,
for instance.
@romildo
Copy link
Contributor Author

romildo commented Sep 15, 2020

I have added an option to enable indicator.

@worldofpeace
Copy link
Contributor

worldofpeace commented Sep 15, 2020

Regarding Pantheon and nm-applet, it is not clear to me that Pantheon is making any use of nm-applet, although it is started in https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/services/x11/desktop-managers/pantheon.nix#L242.

The network indicator in Pantheon pane looks different from nm-applet, and it does not go away and still works after killing nm-applet.

Would it be possible that Pantheon has its own network indicator and do not use nm-applet?

Screenshot from 2020-09-14 19 51 39

Pantheon does have it's own network indicator, but it does make use of networkmanagerapplet in a way that it needs it as a service running in the background. (specifically it's called within switchboard-plug-network)

@worldofpeace
Copy link
Contributor

I just tried this with pantheon and the session wouldn't start. Though I couldn't reproduce it afterwards, not sure what's going on there. Though, I still think it would be correct to disable there. Could you also turn off indicator in pantheon.nix?

@romildo
Copy link
Contributor Author

romildo commented Sep 15, 2020

I just tried this with pantheon and the session wouldn't start. Though I couldn't reproduce it afterwards, not sure what's going on there. Though, I still think it would be correct to disable there. Could you also turn off indicator in pantheon.nix?

Done.

@worldofpeace worldofpeace merged commit d23f814 into NixOS:master Sep 15, 2020
@worldofpeace
Copy link
Contributor

@romildo Thanks ✨ Merged

@romildo romildo deleted the upd.nm-applet branch September 15, 2020 01:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants