I am on a Windows machine running cygwin and X, with three monitors. When I ssh -Y to a remote machine, DISPLAY is set to something like localhost:15.0. Is there a way to determine what other values can be used to point back to my local machine?
It seems that I should be able to do things like
DISPLAY=localhost:15.2 xeyes
to have the program appear on the second monitor. However, so far, nothing except the default value has worked. I've only tried localhost:15.1, localhost:15.2 and localhost:15.3, but I'm out of ideas as to what else I can try.
If there is a way to control the monitor other than DISPLAY, I'm happy to use that as well.
I don’t think cygwin X supports screennumber in the display name for monitor-mapping. However, all X programs take a -geometry
argument that you can use to set the initial window position. It’s documented in the “Geometry Specifications” section of the X(7) manpage. The X display is virtually a big rectangle enclosing all the monitors. If the top-left corner of monitor two is (1200, 0) in X coordinates, you can get xeyes to the top-left corner of monitor two by running xeyes -geometry +1200+0
. If nothing shows up—maybe that coordinate is off-screen—try looking at the coordinates of an existing window by running xwininfo
from a terminal and then clicking on the existing X window.