Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

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 
share|improve this answer
    
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! –  gojira Sep 30 '11 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. –  RedGrittyBrick Sep 30 '11 at 8:52
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.