Re: Gtk-WARNING **: cannot open display:
Luis R Finotti wrote:
> On Wed, 29 Mar 2006, Niels Larsen wrote:
>> I am using debian sarge.
>> When I try to run: "sudo synaptic" I get the below warning.
>> (synaptic:4338): Gtk-WARNING **: cannot open display:
>> I have to my ~/.bash_profile file added following, according to
>> advice from
>> some mailing list, but it does not help:
>> if [[ -z $DISPLAY ]]; then
>> export DISPLAY=:0.0
>> And I ran: "sources ~/.bash_profile" right after
>> Any suggestions?
>> Thanks in advance :-)
>> I am a newbie, so please do explain a little bit in detail, as I find
>> enormous with commands, and possibly do give a small example *smile*
>> Not only what to do, but also how to do *humour - smile*
>> Many times I find examples better than "long" explanations?
> I think you do the following: before "sudo whaterver", do as the
> regular user:
> xhost +local:localhost
> then "sudo whatever".
No; this has unwanted security ramifications.
If the user is set up properly in /etc/sudoers, then sudo should handle
the necessary authorization work.