[comp.windows.x] Canonicalizing my display: 0.0 id -- is there a standard?

phil@ux1.cso.uiuc.edu (Phil Howard KA9WGN) (05/22/91)

When my .xsession runs as a child of xdm, my display id looks like:

    display:0

yet when an xterm process is started up, and things run under that
process, the display id comes out like:

    display:0.0

I am creating various log files for various things, and as part of the
names of the files, am appending ${DISPLAY} so that files are separate
for each different display I use, particularly to avoid interleaved logs.

I also keep the pid of the program that my .xsession executes so that
it can be killed by some other shell script when I am ready to kill it.

The problem is the inconsistent names.  What I believe I need to do is
to change the form "display:0" into "display:0.0" at the very beginning
of my .xsession so that all references will be exactly alike so that I
can refer to the same display in circumstances where strings must match
exactly.

I'd like to know if this is the best thing to do.

Assuming it is ok to do, what is the best way to do this.  I can imagine
a few ways, but am seeking opinions in the best and most concise and
efficient.  I am progamming in csh, but that may not always be the case.
Simply appending ".0" won't work as I am not assured that xdm will give
me the shorter form.  It certainly would do no good to get "display:0.0.0".

A one line csh statement to make either "display:0" or "display:0.0" into
"display:0.0" would be nice.  But two or three would be ok.
-- 
 /***************************************************************************\
/ Phil Howard -- KA9WGN -- phil@ux1.cso.uiuc.edu   |  Guns don't aim guns at  \
\ Lietuva laisva -- Brivu Latviju -- Eesti vabaks  |  people; CRIMINALS do!!  /
 \***************************************************************************/