[avahi] avahi-discover- RunTimeError: could not open display

Lennart Poettering lennart at poettering.net
Sat Dec 22 14:58:18 PST 2007


On Thu, 20.12.07 16:45, Amba Giri (giri.amba at gmail.com) wrote:

> Hi

Hi!

> After I install avahi-discover and run it, I get the following error msg:
> 
> File "/var/lib/python-support/python2.4/gtk_2.0/gtk/__init__.py
>                          line 45, in ?
> from _gtk import *
> RunTime Error: coud not open display
> 
> I am running as root and I have set the DISPLAY variable but the error stil
> occurs.

Most likely the error you are experiencing happens exactly because you
run the script as root and the root user doesn't know the X11
authentication cookie. Please note that this is in no way Avahi error,
this happens to all X programs if you call them like that.

There's no reason to run avahi-discover as root. Just run it as normal
user and everything should work fine.

Alternatively open up your X11 display for everyone by entering 
"xhost +" on some (non-root) terminal on your X session.

Lennart

-- 
Lennart Poettering                        Red Hat, Inc.
lennart [at] poettering [dot] net         ICQ# 11060553
http://0pointer.net/lennart/           GnuPG 0x1A015CC4


More information about the avahi mailing list