title: How high do X11 display numbers go?
body: <p>The displayno is part of the X11 <a href="http://linux.die.net/man/7/x">display name</a>.</p>
  
  <p>I have seen several definitions that explain it is a number from 0 upwards, but I haven't seen any documents that explain if there is a maximum display number.</p>
  
  <p>What is the highest display number? Where is it defined?</p>
  
  <hr/>
  
  <p>The background for this question is that I am trying to understand the Display number allocation algorithm of <a href="https://github.com/ponty/PyVirtualDisplay">PyVirtualDisplay</a>. I haven't understood the role of the /tmp/.X*lock files yet, but it looks like the allocation routine will choose always increasing display numbers, suggesting at some stage of repeatedly being invoked it might hit the limit and fall over, especially if it is small.</p>