in X I know you can get the geometry of a window with xwininfo
.
Unfortunately, if i retrieve such geometry from a gnome-terminal and use that to start another one with gnome-terminal --geometry ...
, the two windows' top and left don't match.
Indeed, the new terminal is south-east shifted by the width and height of the old terminal's window decoration.
How can I start a new terminal that completely overlaps a first one?
I can propose you a workaround for this problem which is working for me. First of all you obtain the geometry of the window with the following command:
You will get something like this:
Neither the information in the
-geometry 80x24+775+315
section nor the information inAbsolute upper-left X: 783
andAbsolute upper-left Y: 344
allows you to launch a gnome-terminal in the same position than the current on. You have to mix both data to get the appropriate information.Note: I have check this under Ubuntu 11.10 | Unity