re q how to avoid xopendisplay hang in article c xr oy skates gsfc nasa gov andy ice stx com writes i m writing xwall a simple x version of wall and i want it to put a message up on each of a default list of displays the problem is that xopendisplay hangs if one of the displays is currently controlled by xdm login screen xdm does xgrabserver when it s running in secure mode so do some screen locks there s really no simple way to tell this is the case you can take xdm out of secure mode probably not too cool you can wrap your call to xopendisplay in some code which solicts a future sigalrm and longjmps past the xopendisplay from the signal handler an example of this can be seen in the xdm sources note that longjmping out of xopendisplay probably causes a memory leak any program functioning this way probably needs to exit regularly
