title: How to distinguish displays in gnu-screen multi display mode?
body: <p>Let's attach to not-detached session few times:</p>
  
  <p>In one terminal (say having pts 11):</p>
  
  <pre><code>$ screen -x    #say this will get pid 111
  </code></pre>
  
  <p>In another one (say pts 22):</p>
  
  <pre><code>$ screen -x    #get pid 222
  </code></pre>
  
  <p>Is there a way to <strong>programatically</strong> distinguish these two from inside of the screen?</p>
  
  <p>OR (in another words)</p>
  
  <p>Is there a way to link pid 111/222 or pty 11/22 to currently opened window inside?</p>
  
  <p>Note I can tell "manually" by invoking screen command ":displays" (C-a *). But it seems that is not possible to redirect output of screen commands somewhere (to be clear: screen commands (C-a :), not commands in the screen).</p>