0

Every morning I usually start working with Cygwin like this: First I start Xming. Then I open a cygwin text-console (the one which looks like a dos-box). Then I start two xterms, and from the xterms I start several other programs via ssh and X-export. Then I carefully position all the windows to the sizes and positions I want them.

My question is about the last step.

It takes a long time to re-position the windows every morning when I start working.

Can I somehow tell an X-program where and at which dimensions it (the window) should start up?

I.e. I want to say something like: start xterm at +300 +300 relative to the upper right corner of the screen, with dimensions of XxY pixels (or characters)

OS used:

local PC: Win 2000, Win 7, Cygwin

remote: servers withy various flavours of linux/unix on them

1 Answer 1

1

Programs for the X window system usually support a -geometry command line parameter:

most X programs accept a command line argument of the form -geometry WIDTHxHEIGHT+XOFF+YOFF (where WIDTH, HEIGHT, XOFF, and YOFF are numbers) for specifying a preferred size and location for this application's main window.

For example:

xeyes -geometry 100x100-37+50 
2
  • Thank you for the answer, it works. However I can not find anywhere detailed information on the geometry command. For example what is weird that for xterm, the first two parameters seem to be interpreted in characters, for programs like xeyes it seems to be interpreted in pixels!
    – user50105
    Commented Sep 30, 2011 at 5:37
  • "The WIDTH and HEIGHT parts of the geometry specification are usually measured in either pixels or characters, depending on the application. The XOFF and YOFF parts are measured in pixels" - XFree86.org. It is true that the xterm documentation doesn't mention whether the dimensions are pixels or characters. Commented Sep 30, 2011 at 8:52

You must log in to answer this question.