Ma, Qingyu (GE Healthcare) wrote:
> Thanks for your reply.
> 
> My process is executed in a script which is executed by another process. The 
> script is like:
> 
> export DISPLAY=:0.1
> ./myProcess & 
> export  DISPLAY=:0.0
> 
> I know when myProcess opens display, current DISPLAY maybe changed back to 
> :0.0.  It's another issue. But till now, myProcess is displayed on :0.1 each 
> time.
> Of course, I'm not sure if myProcess try to open display at the right point 
> of changing DISPLAY, whether it can get a valid display (0 or 1)?

export/setenv only affect processes started from the shell after the command is
run.   Since myProcess is already running, the second export cannot affect it.

> Is there any other possibility to cause XOpenDisplay fail, like network, IP 
> stack or anything?

XOpenDisplay can also fail if:

 - you don't have currently valid authorization (either a good
   entry in the xauthority file for the display or a xhost entry
   allowing access to your host/userid - see the XSecurity man
   page for more info on the various authentication mechanisms)

 - DISPLAY specifies an invalid hostname

 - the X server is not running

 - the X server has hit it's maximum number of open connections,
   such as if you called XOpenDisplay() every time you wanted to
   change an LED, and never called XCloseDisplay()

-- 
        -Alan Coopersmith-        [email protected]
         Oracle Solaris Platform Engineering: X Window System

_______________________________________________
[email protected]: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: http://lists.freedesktop.org/mailman/listinfo/xorg

Reply via email to