I am using several programs on my computer that minimize to tray, but do not have an option to start minimized to tray. I have them set to open at the start, and as a result every time I boot up my computer I have to close a bunch of random windows. Needless to say, that is a bit annoying.
Is there a way to create some kind of startup script that will open these programs and then close their windows, without killing the process entirely?
Oh sorry I guess I misunderstood this.
So its windows that are closed but not exited the application, icon still exists in task tray in panel.
There is probably another qdbus way of doing it … but all of my tests show it unreliable because it closes whatever open window. I also feel something like pkill would terminate the whole process.
So … unless someone has a better idea … then you could maybe employ xdotool or wmctrl.