I've wanted to do the same thing for debugging. The problem seems to be that window manager is overriding the provided old-style requests. I can give you a kludgy answer, but it will work (sort of).
First, you need the xdotool
, a utility that executes X actions from the command line. E.g.
sudo apt install xdotool
Then, you can start an xterm minimized as follows:
(xterm &); xdotool windowminimize $(xdotool search --sync --class xterm |head -1)
Some explanation . . . obviously, the first command starts the xterm. You could start the terminal with a command or whatever. The second command minimizes the window with a supplied window id. The window id is supplied by nested call to xdotool
that returns all window ids matching the xterm
class. We use the first on the stack, which should almost certainly be the one that we just created. The --sync
option is necessary to make xdotool pause until there is an id that is of the xterm window class.
This kludge could fail if you are planning on launching multiple xterm windows in this fashion. In that case, you could add some sleep
before the call to xdotool
.
Yeah, I know this is a disgusting solution. But it's the only one I know.
xterm -maximized
starts xterm in a maximized view as expected. – Oscillon Jan 05 '20 at 20:14