if "desktops (or whatever the heck they are officially known as)" is what KDE calls "virtual desktops", i.e. you define e.g. 8 desktops and have different windows on each, but "sticky" windows are shown on all desktops, then the answer (at least with KDE) is to use kstart
. It has a --desktop
option to specify the desktop:
kstart --desktop 3 chromium-browser
kstart --desktop 3 konsole -geometry 600x400+0+0
It's not very robust though. It first launches the program and then waits for the window to appear. If the window title is not what it guesses you have to use the --window
option. When the window appears it is relocated to the given desktop.
kstart also has a --geometry
option to specify the window geometry but in my case it was ignored. Instead I specified the geometry with application specific geometry options, see Robie Basak's answer above