I've seen similar questions but not identical ones, how do I resize a specific window to a specific size and location on the screen from within a script? I've seen the use of Resize and Printf but haven't been able to make anything work. Does it matter what type of window it is?This is in Ubuntu Linux, running a bash script, and the window is opened using gnome. The aim is to manage the size of the GUI window and the position it pops up.
Resize a specific window to a specific size and screen location from within a script
window;window management
resize (a utility provided with xterm) can resize most xterm-like windows.  To get 30 rows by 60 columns, the script would runresize -s 30 60to resize the window within which it is running.In a quick check, mlterm, mrxvt, urxvt, vte (e.g.,. gnome-terminal) and xterm respond to the escape sequence.  KDE konsole does not, nor does st or terminology.Comments mention devilspie and wmctrl, which work with the window manager outside the terminal.  The window manager ultimately controls the size and position of every window on an X display, but is a little more complicated to work with, since the script has to determine the window title and use that to tell these programs which window to resize.  According to the manual page, devilspie may not be suitable, since it applies to windows as they are created.Further reading:resize  - set environment and terminal settings to current xterm window sizeWhy can't my program set the window size? (xterm FAQ)Resizing windows to a particular width and height instantlywmctrl - interact with a EWMH/NetWM compatible X Window Managerdevilspie - perform actions on windows as they are created 