Get list of displays

Adam Jackson ajax at nwnk.net
Fri Aug 24 04:04:04 PDT 2007


On Thu, 2007-08-23 at 23:50 -0300, Tiago Vignatti wrote:
> dv escreveu:
> > Hi, 
> > is it possible to get a list of existing displays somehow? I searched 
> > the Xlib API, but I cant find anything. For example, when two servers 
> > are active, I'd like to get a list containing ":0" and ":1" somehow...
> > 
> > any ideas?
> 
> One could be read "/tmp/.X11-unix/" directory (at least on unix-based 
> systems).

Do not do this.

I'm planning to move the X server's unix socket to the abstract
namespace on Linux systems.  This fixes numerous problems with the /tmp
approach, not least of which being that per-user /tmp will actually
work.

The simple answer is you can't get a list of existing displays.  The
correct way to fix this would be to have the X server claim a name
corresponding to the display on dbus.

- ajax
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.x.org/archives/xorg/attachments/20070824/96eb36c0/attachment.pgp>


More information about the xorg mailing list