Re: cannot open display
On Mon, 8 Nov 2004 03:58:12 -0800 (PST), belahcene abdelkader
<belahcene@yahoo.com> wrote:
>
> hi,
> in some distro ( like unbutu : debian-like), when I
> use the su - from the normal user to run an
> administartor command , I get cannot open display: 0.0
> I give the access with xhost +,( in the normal user )
> but the problem remains
> this is an example:
>
> as a normal login user:
>
> bela@inst177:~ $ xhost +
> access control disabled, clients can connect from any
> host
> bela@inst177:~ $
>
> as a root now
>
> bela@inst177:~ $ su -
> Password:
> root@inst177:~ #
> /usr/local/mozilla-installer/mozilla-installer
>
> Gtk-WARNING **: cannot open display: 0.0
> root@inst177:~ #
>
If you are using Ubuntu is better if you check the Ubuntu
documentation and mailing lists, anyway xhost command is deprecated,
better use xauth instead. Use the man page for details, to add root to
your X session use something like
xauth -f ~$USERNAME/.Xauthority extract - `hostname`/unix:0 | xauth merge -
Andrea
Reply to: