First thing I did was to install synaptic package manager.
However, when I try to run it, I get:
linus@mypc:~$ sudo synaptic
No protocol specified
Failed to connect to Mir: Failed to connect to server socket: No such file or directory
Unable to init server: Could not connect: Connection refused
(synaptic:3684): Gtk-WARNING **: cannot open display: :0
The same happens if I try to run other programs as sudo like e.g. gedit…
What’s causing this and how can I fix it?
Thanks. That does indeed work when I run synaptic from the console.
But whenever I run it by clicking “Synaptic Package Manager” in the Mate Menu, I get the “Authenticate” prompt window and after entering the password nothing happens. Is there a way to get around this as well?
I’d start all this over from the beginning. The sudo probably created a .synaptic directory in your home directory which isn’t good to leave there. It should be in /root.
The gksu and gksudo should work BUT it’s not the norm. Maybe it’s doing something I’m not aware.
Just plain synaptic-pkexec is the norm these days. No sudo or gksu needed. Look at the menu launcher and that’s what you should see.
I suggest blowing away ~/.synaptic and /root/.synaptic and try again. Does the menu start working?
EDIT: Tried to reproduce this in a 16.04 VM that already has a working synaptic installed. Best I can tell, synaptic seems to be robust when started by any method I tried. Even sudo. So I’m not sure why it is complaining about rights to graphics.
If removing the /root/.synaptic directory doesn’t help, maybe a reinstall or purge/install of synaptic may get it.
Hi Bill, there was in fact a .synaptic folder in both my home and ./root. I removed both but clicking “Synaptic Package Manager” in the Mate Menu still only brings up the “Authenticate” password prompt and then nothing happens…
Same as synaptic-pkexec in a terminal? Any clues/errors in the terminal?
You can right-click that menu entry and add it to desktop or panel and view the properties there. This should confirm it is, in fact, running synaptic-pkexec.
And here’s a complete reinstall that may help…
sudo apt purge synaptic
sudo apt autoremove
At this point, you may want to remove any .synaptic directories again.
Yes, the menu entry is correctly set to “synaptic-pkexec”.
When I run synaptic-pkexec in the console (without gksudo), I get again the error message:
No protocol specified
Failed to connect to Mir: Failed to connect to server socket: No such file or directory
Unable to init server: Could not connect: Connection refused
(synaptic:3684): Gtk-WARNING **: cannot open display: :0
Following your suggested removal and reinstallation does not change this.
I installed Synaptic via the Software Boutique -> More Software.
Tried the “Fixes” section of the Software Boutique as you suggested but to no avail.
I guess I might try to reinstall UM but I did not really do anything after the last installation but installing and trying the Synaptic Package Manager. So why should it be different the next time?