根据其他答案,对我有效的组合是:
1. 清除 indicator-common:`sudo apt purge indicator-common`。这也会删除 Unity 桌面。在从 Ubuntu 16.04 升级后,我的系统上仍然存在,但现在已经停用了。
2. 安装 Ubuntu AppIndicators:`sudo apt install gnome-shell-extension-appindicator`。
3. 重新启动 gnome-shell:`gnome-shell --replace &`。这将从终端重新启动 gnome-shell 并在后台运行。
4. 打开 Gnome Tweaks(参见
mifjpn's answer)并启用 Ubuntu appindicators 扩展。如果看不到它,可能需要重新启动 Gnome Tweaks 和/或 gnome-shell。
5. 再次重启 gnome-shell:`gnome-shell --replace &`。然后(可选)在此之后执行 `disown %1`,将该进程与终端分离,以免意外关闭终端时意外终止 gnome-shell。
第二次重启后,指示灯终于变得可见。我有点失望,在安装软件包后,我需要重启gnome-shell两次,首先使扩展在gnome tweaks中可见以便我可以启用它们,然后再真正运行它们。(这可能是因为只有第二次重启才能启动我使用指示器的小应用程序。)
注意:我没有安装TopIcons扩展。