Public bug reported:
Release: Ubuntu 26.04 (resolute)
Package version: network-manager-applet 1.36.0-4ubuntu1 (binaries
network-manager-applet, nm-connection-editor)
apt: 3.2.1
On Ubuntu 26.04, both binary packages from network-manager-applet have
this in Depends:
gnome-shell | policykit-1-gnome | polkit-1-auth-agent
network-manager-applet also has this in Recommends:
gnome-shell | notification-daemon
Some systems have no polkit agent yet: a minimal or server install, a
container, or a system adding a non-GNOME desktop or window manager.
There, apt's solver satisfies the Depends with the first alternative. So
`apt install network-manager-applet` installs gnome-shell and, through
gnome-shell, gdm3. That is 855 packages in total, a whole GNOME desktop
and a second display manager, on a system that only wanted the tray
applet. `--no-install-recommends` does not avoid it, because the gnome-
shell alternative is in Depends: it still installs gnome-shell (483
packages).
Debian 13 (network-manager-applet 1.36.0-3+b1) has `policykit-1-gnome |
polkit-1-auth-agent` in Depends and `notification-daemon` in Recommends,
so this is specific to the Ubuntu delta.
## Steps to reproduce
Use a clean ubuntu:26.04 container, with only the Ubuntu archive (the
image's default sources: resolute, resolute-updates, resolute-backports,
resolute-security; main, universe, restricted, multiverse):
docker run --rm ubuntu:26.04 sh -c '
apt-get update -qq &&
apt-get install -s network-manager-applet > /tmp/sim.txt &&
echo "installs: $(grep -c "^Inst " /tmp/sim.txt)" &&
grep -E "^Inst (gnome-shell|gdm3) " /tmp/sim.txt | cut -d" " -f1-3'
Output:
installs: 855
Inst gnome-shell (50.1-0ubuntu1.5
Inst gdm3 (50.1-0ubuntu0.1
`apt-get install -s nm-connection-editor` gives 850 installs, also with
gnome-shell and gdm3. The old solver (`--solver internal`) gives the
same result, with 858 installs.
The solver trace (`-o Debug::APT::Solver=1`) shows gnome-shell coming in
for network-manager-applet's Depends:
Install:gnome-shell:amd64=50.1-0ubuntu1.5 (network-manager-
applet:amd64=1.36.0-4ubuntu1 -> network-manager-applet:amd64 -> gnome-
shell:amd64)
## Expected
On a system without a polkit agent, installing the applet should bring
in a small agent, not a desktop shell and a display manager. Debian's
packaging does this.
## Actual
gnome-shell and gdm3 are installed. gdm3 then claims display-
manager.service, so a system that uses another display manager boots
into gdm3. Removing it later takes care: removing gdm3 stops the running
gdm, which ends a graphical session that gdm started.
## Proposed fix
**Depends** (both binaries): drop gnome-shell from the alternatives, as
in Debian:
policykit-1-gnome | polkit-1-auth-agent
gnome-shell Provides polkit-1-auth-agent, so GNOME systems still satisfy
the dependency with what they already have. Tested by simulation below:
installing gnome-shell together with the applet adds no extra agent.
Note: putting the virtual package first (`polkit-1-auth-agent |
policykit-1-gnome | gnome-shell`) makes it worse. The solver picks the
first provider of polkit-1-auth-agent it finds, and in the test that was
cinnamon (511 packages without Recommends, 1019 with them).
**Recommends** (network-manager-applet): put notification-daemon first:
notification-daemon | gnome-shell
Without this, a system that has a polkit agent but no notification
daemon still gets gnome-shell and gdm3 through Recommends (849
installs). Debian recommends only notification-daemon.
## Test results
These are simulated installs (`apt-get install -s`) in a clean
ubuntu:26.04 container. Each variant is the archive's .deb with only the
control field changed (`dpkg-deb -R`, edit, `dpkg-deb -b`), served from
a local `file:` repository.
- Stock, network-manager-applet: 855 installs; GNOME pulled in: gnome-shell,
gdm3
- Stock, --no-install-recommends: 483 installs; GNOME pulled in: gnome-shell
- Stock, together with mate-polkit: 849 installs; GNOME pulled in: gnome-shell,
gdm3 (via Recommends)
- Stock, with mate-polkit and notification-daemon: 324 installs; GNOME pulled
in: none
- Depends 'policykit-1-gnome | polkit-1-auth-agent', --no-install-recommends:
174 installs; GNOME pulled in: none (policykit-1-gnome)
- Depends 'polkit-1-auth-agent | policykit-1-gnome | gnome-shell',
--no-install-recommends: 511 installs; GNOME pulled in: none, but cinnamon
- Both changes (Depends and Recommends), default install: 321 installs; GNOME
pulled in: none (policykit-1-gnome, notification-daemon)
- Both changes, nm-connection-editor: 235 installs; GNOME pulled in: none
- Both changes, together with mate-polkit: 324 installs; GNOME pulled in: none
- Both changes, together with gnome-shell: 848 installs; GNOME pulled in: only
the requested gnome-shell (and its gdm3); no extra agent
## Workaround
Install a polkit agent and a notification daemon in the same command,
for example:
sudo apt install mate-polkit notification-daemon network-manager-
applet
Or use any other provider of polkit-1-auth-agent and notification-
daemon.
---
Drafted with AI assistance; the behavior was reproduced in clean ubuntu:26.04
containers and the results were checked by hand.
** Affects: network-manager-applet (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2175398
Title:
network-manager-applet and nm-connection-editor pull in gnome-shell
and gdm3 on systems without a polkit agent
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/network-manager-applet/+bug/2175398/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs