Xfce with several desktops defined, I want to launch a program and have it start in a desktop that's different from the one which has the current focus.
I know how to write script which launches the program in the current desktop in the background, captures its pid, uses the pid to find its X Window ID via
wmctrl, and then uses
wmctrl again to move that window to a different desktop.
However, I do not want the program to launch in the current desktop ... not even for a fraction of a second. I want it to start immediately in the other desktop, without the current focus leaving the current desktop. And I don't want to have to use a script to start the program in the background, just so my script can capture its pid for the purpose of identifying the program's window with
wmctrl. Sometimes, I will want the program to run in the foreground and simply immediately display its window on a different desktop than the current one.
I don't know if this is even possible under
Xfce or even under any
X11 environment, but if so, could someone point me to a utility which I can use for this exact purpose?
Thank you in advance.