Problem with Synaptic and Obmenu

Here you can discuss every aspect of Debian. Note: not for support requests!

Problem with Synaptic and Obmenu

Postby fvs » 2018-02-26 14:47

Can't open synaptic or obmenu in terminal with sudo or root?
Can'tfrank@debian:~$ sudo synaptic
No protocol specified
Unable to init server: Could not connect: Connection refused

(synaptic:1062): Gtk-WARNING **: cannot open display: :0
fvs
 
Posts: 144
Joined: 2006-06-16 22:33

Re: Problem with Synaptic and Obmenu

Postby Bulkley » 2018-02-26 16:40

Obmenu shouldn't need root. For Synaptic, use su and when prompted enter your root password. I have this in my Openbox menu:
Code: Select all
gksu -g /usr/sbin/synaptic

The gksu is a box for entering root password.
Bulkley
 
Posts: 5617
Joined: 2006-02-11 18:35

Re: Problem with Synaptic and Obmenu

Postby Head_on_a_Stick » 2018-02-26 18:36

^ I think gksu is being phased out in favour of pkexec.

The synaptic.desktop file calls
Code: Select all
synaptic-pkexec

which is a wrapper for
Code: Select all
pkexec synaptic

EDIT: obmenu should not be run as root because it will save the configuration file in /root and won't change your desktop.
ESTRAGON: We always find something, eh, Didi, to give us the impression we exist?
VLADIMIR (impatiently): Yes, yes, we're magicians.
User avatar
Head_on_a_Stick
 
Posts: 7893
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Problem with Synaptic and Obmenu

Postby Bulkley » 2018-02-26 20:33

Head_on_a_Stick wrote:I think gksu is being phased out in favour of pkexec.

That's interesting. My gksu is working for now but I'll take a look at pkexec.

I often wish that sudo had not been invented. It has its uses but it is badly abused, especially by newbies.
Bulkley
 
Posts: 5617
Joined: 2006-02-11 18:35

Re: Problem with Synaptic and Obmenu

Postby Head_on_a_Stick » 2018-02-26 20:46

Bulkley wrote:My gksu is working for now

Yes, it should still work for the foreseeable future.

The problem is that gksu allows the application too many privileges and pkexec is supposed to address this but it does require a special exception file in /usr/share/polkit-1/actions/ (which is supplied by the synaptic package) so it won't work for everything.

Bulkley wrote:I often wish that sudo had not been invented. It has its uses but it is badly abused, especially by newbies.

+1

OpenBSD has demoted sudo to the ports tree and moved to doas(1) instead, it's a _much_ cleaner solution :cool:
ESTRAGON: We always find something, eh, Didi, to give us the impression we exist?
VLADIMIR (impatiently): Yes, yes, we're magicians.
User avatar
Head_on_a_Stick
 
Posts: 7893
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Problem with Synaptic and Obmenu

Postby Head_on_a_Stick » 2018-02-26 20:57

fvs wrote:
Code: Select all
Unable to init server: Could not connect: Connection refused

Just for the record, this will let you start synaptic with sudo:
Code: Select all
xhost +local:

Don't do it though, it is fundamentally insecure.
ESTRAGON: We always find something, eh, Didi, to give us the impression we exist?
VLADIMIR (impatiently): Yes, yes, we're magicians.
User avatar
Head_on_a_Stick
 
Posts: 7893
Joined: 2014-06-01 17:46
Location: /dev/chair


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 2 guests

fashionable