Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Problem with Synaptic and Obmenu

Here you can discuss every aspect of Debian. Note: not for support requests!
Post Reply
Message
Author
fvs
Posts: 144
Joined: 2006-06-16 22:33

Problem with Synaptic and Obmenu

#1 Post by fvs »

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

Bulkley
Posts: 6386
Joined: 2006-02-11 18:35
Has thanked: 2 times
Been thanked: 39 times

Re: Problem with Synaptic and Obmenu

#2 Post by Bulkley »

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.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: Problem with Synaptic and Obmenu

#3 Post by Head_on_a_Stick »

^ 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.
deadbang

Bulkley
Posts: 6386
Joined: 2006-02-11 18:35
Has thanked: 2 times
Been thanked: 39 times

Re: Problem with Synaptic and Obmenu

#4 Post by Bulkley »

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.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: Problem with Synaptic and Obmenu

#5 Post by Head_on_a_Stick »

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:
deadbang

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: Problem with Synaptic and Obmenu

#6 Post by Head_on_a_Stick »

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.
deadbang

Post Reply