[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: XDM... source level

řann 28-Feb-98 skrifar Erik Walthinsen:
> If this works as advertised, is there a way to tell when the display is 
> removed?  The ability to trap that and start some recovery procedure (such 
> as starting a VGA16 server [if it works] and a program to fix the X config) 
> is almost a requirement.  Could a fork()/exec() be put in here to kick off 
> a separate program?  Or can we tell externally?
  There is a lot that can be done in there.  The three line code
was just to prove that this could be solved.  You can tell if the
display is local, by 'd->displayType.location == local', in which
case 'd->displayType.orign == FromXDMCP' will be false of course.

  There is no resource, that says what depth the server is in, but it
should be possible to scan that from the line it's started with.  Or
create a resource that provides it along with a client to start if the
local server fails.

  Now, there are a few things to notice though.  First, you can have
more than one local server (More than one display, currently I think
this is only VGA and Mono for the PC's).  So, before actually exiting
XDM itself, you need to check if it has no displays running (i.e. if
the daemon is the only process running), that's not difficult since it
keeps a list of active displays (XDM itself is kept on the list as a
display entry when run in daemon mode).

  The display structure itself, can easily take more resource definitions,
the only requirement is that they be added last to the structure of
course.  So, introducing resources to add possibilities, is not a problem
here either.

Orn Einar Hansen                         oe.hansen@oehansen.pp.se
                                        voice+fax; +46 035 217194