Ubuntu – Can’t run synaptic package manager on Ubuntu 18.04.1

18.04synaptic

I installed synaptic through terminal, but I didn't find it when I search for it, so I uninstalled it. I tried to install it through package manager, I thought it would install more properly. Then I run it while searching and clicking by app launcher. I get prompt for sudo password then nothing happen… I tried to open synaptic through terminal, it worked but I got this error message:

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

And a pop-up saying:

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.

I am using Ubuntu 18.04.1 and I'm new to Linux. Can anyone explain to me what happened and help me fix it, thanks.

Best Answer

This is a "feature" of Wayland, which prevents GUI software needing root from running via sudo. You can get around it by running

xhost +si:localuser:root

after logging in. If you often need to use sudo applications you could put this command in a script in your startup applications.