无法在Ubuntu 18.04.1上运行synaptic包管理器

我通过终端安装了synaptic,但是当我搜索它时没有找到它,所以我卸载它(通过终端也)我尝试通过包管理器安装它,我认为这是最安全的方式,所以我搜索了它,发现它并点击它,它需要用户密码,没有任何事情发生后,我试图通过终端打开synaptic,它工作,程序打开(没有用户密码请求)与此错误代码:

Gtk-Message: 18:14:50.057: GtkDialog mapped without a transient parent. This is discouraged. 

弹出消息说:

 Starting "Synaptic Package Manager" without administrative privileges You will not be able to apply any changes, but you can still export the marked changes or create a download script for them. 

我现在使用Ubuntu 18.04.1而且我是这个开源世界的新手,所以我想任何人都可以向我解释发生了什么并帮我修复它,谢谢。

请注销,选择Ubuntu会话(这意味着使用Xorg)

Xorg上的Ubuntu

然后像往常一样启动Synaptic:

  • 从GUI中通过在Dash中找到它

    突触

    并输入您的密码。

  • 或来自具有synaptic-pkexec终端。

笔记:

1.对于搜索function安装apt-xapian-index包:

 sudo apt-get install apt-xapian-index sudo update-apt-xapian-index 

然后重启Synaptic。

2. Synaptic不适用于Wayland会话并显示错误 –

 $ synaptic-pkexec No protocol specified Unable to init server: Could not connect: Connection refused (synaptic:3825): Gtk-WARNING **: 21:28:57.667: cannot open display: :0 

这是Wayland的“function”,它可以防止需要root的GUI软件通过sudo运行。 你可以通过跑步来解决它

xhost + si:localuser:root

登录后。如果您经常需要使用sudo应用程序,可以将此命令放在启动应用程序的脚本中。