在 virtualbox 下安装 Ubuntu 后缺少 nm-applet

在 virtualbox 下安装 Ubuntu 后缺少 nm-applet

在 VirtualBox 下安装 Ubuntu 后,nm-applet 丢失。

我已经尝试重新启动小程序,但什么也没发生。有什么建议吗?

$ kill nm-applet 
bash: kill: nm-applet: arguments must be process or job IDs 
$ kill 2649 
$ sudo nm-applet 


** (nm-applet:2740): WARNING **: Could not initialize NMClient /org/freedesktop/NetworkManager: The name org.freedesktop.NetworkManager was not provided by any .service files 
** Message: applet now removed from the notification area 

** (nm-applet:2740): WARNING **: Failed to register as an agent: (2) The name org.freedesktop.NetworkManager was not provided by any .service files 
** Message: using fallback from indicator to GtkStatusIcon 

(nm-applet:2740): GdkPixbuf-CRITICAL **: gdk_pixbuf_scale_simple: assertion `dest_width > 0' failed 
** Message: Starting applet secret agent because GNOME Shell disappeared 

** (nm-applet:2740): WARNING **: Failed to register as an agent: (2) The name org.freedesktop.NetworkManager was not provided by any .service files

感谢您的建议。

我已经删除了network-managernetwork-manager-gnome包并重新安装。此外,我还安装了包network-manager-dpg,但终端显然不知道包network-manager。Synaptic 告诉我network-manager和都已network-manager-gnome正确安装。

只是有一个问题,network-manager-dbg我使用终端成功重新安装,但错误仍然存​​在。我无法通过互联网升级损坏的软件包,因为没有网络管理器连接就无法工作。

$ sudo dpkg -i ~/Downloads/network-manager-dbg_0.9.4.0-0ubuntu3_amd64.deb 
(Reading database ... 197394 files and directories currently installed.) 
Preparing to replace network-manager-dbg 0.9.4.0-0ubuntu3 (using .../network-manager-dbg_0.9.4.0-0ubuntu3_amd64.deb) ... 
Unpacking replacement network-manager-dbg ... 
Setting up network-manager-dbg (0.9.4.0-0ubuntu3) ... 
$ sudo service Network-manager start 
Network-manager: unrecognized service 
$ >

$ sudo service network-manager start 
[sudo] password for jonas: 
network-manager start/running, process 2471 
$ nm-applet 

** (nm-applet:2517): WARNING **: Could not initialize NMClient /org/freedesktop/NetworkManager: The name org.freedesktop.NetworkManager was not provided by any .service files 
** Message: applet now removed from the notification area 

** (nm-applet:2517): WARNING **: Failed to register as an agent: (2) The name org.freedesktop.NetworkManager was not provided by any .service files 
** Message: Starting applet secret agent because GNOME Shell disappeared 

** (nm-applet:2517): WARNING **: Failed to register as an agent: (2) The name org.freedesktop.NetworkManager was not provided by any .service files 
^C** Message: PID 0 (we are 2517) sent signal 2, shutting down... > 

答案1

看起来该小程序无法与管理网络的服务网络管理器通信。最可能的原因是它没有运行或没有安装。

如果已安装但未运行,请尝试:

sudo service network-manager start

如果尚未安装,您可以使用以下命令进行安装:

sudo apt-get install network-manager network-manager-gnome

gnome 工具很可能已经安装好了,但这并没有什么坏处。

答案2

它又能正常工作了!我在 VirtualBox 下运行 Ubuntu,只需将所有文件从 /etc/NetworkManager 复制到我的实际 Ubuntu 即可!

答案3

正如 Javier 指出的那样他的回答,原因可能是network-manager没有运行。这又可能有原因,正如 askubuntu.com 问题中讨论的那样“网络管理器无法自动启动”

最可能的原因是网络接口在 中配置了自动启动和 DHCP /etc/network/interfaces,但在系统启动时未连接。此原因的一个症状是在启动时出现一条消息“等待最多 60 秒进行网络配置...”。

相关内容