How to open a program on particular desktop

desktopopenboxwindow-manager

When I start GUI program, it's window appears on the currently active desktop (essentially, on a random desktop).

How to make it appear on a specific desktop? For example, at startup I want certain programs to be started and distributed to desktops.

I've already set up config file of openbox to force some programs to always start on specific desktop.

Ideally it should be like:

start_on_desktop 1 gnome-terminal --tab -e program1 --tab -e program2
start_on_desktop 2 gnome-terminal --tab -e program3 --tab -e program4
start_on_desktop 3 firefox

It should be able to start the same program on other desktop.

Also dislike when I start program while being on desktop X then switch to desktop Y and SUDDENLY a program which should be on X appears on Y. When I start lots of programs on and switch often between desktops they end up being in chaos and I need to collect them together and redistribute sanely.

Also I want the first initial gnome-terminal to be on desktop 3, but I also want subsequent gnome-terminals to be on the desktop where I pressed the keystroke (also configured in openbox) that launches gnome-terminal.

Best Answer

try devilspie:

Devil's Pie can be configured to detect windows as they are created, and match the window to a set of rules. If the window matches the rules, it can perform a series of actions on that window. For example, I can make all windows created by X-Chat appear on all workspaces, and the main Gkrellm1 window does not appear in the pager or task list.
Related Question