2

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.

5
  • Try to launch it from Dash or from Applications menu. If you want to run it from terminal - use synaptic-pkexec.
    – N0rbert
    Commented Aug 14, 2018 at 18:09
  • 1
    Did you try sudo synaptic from the command line? The second error seems to suggest you are trying the command without administrator privileges. Commented Aug 14, 2018 at 18:18
  • Did you change your default graphics server from xorg to Wayland?
    – K7AAY
    Commented Aug 14, 2018 at 20:11
  • @K7AAY you are right I tried that before logging in, I wanted to know the difference between those two, still don't understand how it works but I guess wayland block every graphics software needs root access from running however, switching back to X solved the problem Commented Aug 15, 2018 at 1:04
  • Then I suggest you click on the checkmark at left to show the answer which solved your problem.
    – K7AAY
    Commented Aug 16, 2018 at 2:12

2 Answers 2

5

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.

5
  • discourse.ubuntu.com/t/xorg-will-be-the-default-in-18-04-lts/… indicates xorg is the default, and the OP did not state he was running Wayland.
    – K7AAY
    Commented Aug 14, 2018 at 20:11
  • The other answer above from N0rbert has also assumed the problem is Wayland, so why only mark my answer down? Commented Aug 15, 2018 at 8:54
  • 1
    And the OP has now confirmed the problem was Wayland! Commented Aug 15, 2018 at 13:12
  • This worked immediately for me. It also fixed a problem I was having with RealVNC version 5.
    – Gene Olson
    Commented Nov 5, 2018 at 18:04
  • Worked immediately, I would appreciate more in depth explanation or pointer over the Wayland documentation, also how we can assess that Wayland is installed and running. Thx!
    – Richard
    Commented Aug 14, 2019 at 13:06
0

I you are running Wayland (someone can assess if he's running Wayland by issuing this command into a terminal echo $XDG_SESSION_TYPE), and even the new version of X (apparently) are preventing GUI root elevated privilege application execution by default because of the security issues involves with such use case (ref.: https://doc.ubuntu-fr.org/wayland, "Why" section 1, sorry in french). 'gksu' or 'gksudo' are not bundle with standard Ubuntu distribution and they shouldn't be used preferably. To temporarily run GUI applications with root elevated privileges someone could submit this command in terminal:

xhost +si:localuser:root

Then launch the application (in our case synaptic) the usual way.

NOTE: The above command will allow elevated privileged applications to run for the duration of the current Linux session.

It wouldn't be recommended to put it in .bashrc.

If you need a proper way to launch elevated privileges applications here a rely good wiki entry that propose a nice workable solution:

https://wiki.ubuntu.com/Wayland/gks

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .