problem building qt4-x11 on SL

Frédéric Dubois Frederic.Dubois at univ-montp2.fr
Sun Dec 4 00:25:52 PST 2011


I suspected something with launchd

Here is the log ...

vpn2:PythonOCC dubois$ python draw.py
Traceback (most recent call last):
   File "draw.py", line 226, in <module>
     Window(display.Display()).loop()
   File 
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Xlib/display.py", 
line 85, in __init__
     self.display = _BaseDisplay(display)
   File 
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Xlib/display.py", 
line 67, in __init__
     apply(protocol.display.Display.__init__, (self, ) + args, keys)
   File 
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Xlib/protocol/display.py", 
line 45, in __init__
     name, host, displayno, screenno = connect.get_display(display)
   File 
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Xlib/support/connect.py", 
line 67, in get_display
     return mod.get_display(display)
   File 
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Xlib/support/unix_connect.py", 
line 53, in get_display
     raise error.DisplayNameError(display)
Xlib.error.DisplayNameError: Bad display name "/tmp/launch-1hAg4j/org.x:0"

and /tmp/launch-1hAg4j/org.x:0 is the value of DISPLAY

Regards



Le 04/12/11 08:51, Ryan Schmidt a écrit :
> On Dec 4, 2011, at 01:30, Frédéric Dubois wrote:
>
>> By default its not working because the DISPLAY variable is not giving
>> access to a suitable X11 display to python-xlib.
>> Once you "export DISPLAY=:0" it works fine.
>> Is it normal ?
> Ever since Leopard, Apple sets DISPLAY for you, to a special value that makes X11.app automatically anytime it's needed. If you override DISPLAY and set it to something like ":0" then X11.app will no longer automatically launch when needed, and you'll have to launch it manually.
>
> It is possible that python-xlib does not like this special value Apple uses for DISPLAY. What problem do you see when you don't override DISPLAY?
>
>
>
>

-- 
Frédéric Dubois, Eng, PhD
LMGC - UMR CNRS 5508
Université de Montpellier 2, cc 048
Place Eugène Bataillon
34095 Montpellier Cedex 05
Tel 33/0 467144984 - Fax 33/0 467143923
http://www.lmgc.univ-montp2.fr/~dubois
http://www.lmgc.univ-montp2.fr/~dubois/LMGC90



More information about the macports-users mailing list