The Windows in an Xorg session may easily be manipulated with this simple utility.
Xdotool. This is a terminal utility to manage Xorg windows.
Firstly, install this simple utility.
jason@jason-desktop:~$ sudo apt install xdotool |
Then we can resize a MATE Terminal window.
xdotool search --onlyvisible --classname "gnome-terminal" windowsize %@ 500 |
This example will focus the Firefox URL bar.
jason@jason-desktop:~$ xdotool search "Mozilla Firefox" windowactivate --sync key --clearmodifiers ctrl+l Defaulting to search window name, class, and classname |
This final example will search for a MATE Terminal window and open pstree in it.
jason@jason-desktop:~$ xdotool search --onlyvisible --classname "mate-terminal" exec /usr/bin/pstree |
This is a strange, but useful Linux utility. Give this a try and see what you can come up with.