Launched application does not stay on the same desktop

This is a rather complicated problem.

The Window Manager (WM) is supposed to, who would have guessed, manage windows. This includes but is not limited to their position, dimensions, desktop and if they receive decoration or not. What is not part of the WM is launching applications in any way, it will only see and manage the windows which that process will spawn. So, what happens?

  • Switch to Desktop 2
  • Launch NetBeans
    • The Splash-Screen is created as window with no decorations on Desktop 2
  • Switch to Desktop 3
    • The NetBeans-Splash-Screen stays at Desktop 2
  • NetBeans is done and finally creates the main window, which is of course send to the current desktop, as it is a completely new window

The problem in this case is that the Window Manager is completely unaware (or ignorant, not sure) who that window belongs to. There are two possibilities:

Find a window manager which does...

  1. ...support grouping of windows by their parent process
  2. ...allow you to define rules for every window

Or you get a helper application like Devil's Pie which allows to define window rules.


If you use compiz (yes you can even under 12.04 ;) ), you could try to install the compizconfig-settings-manager and then go to the Place Windows submenu to add a new Fixed Window tab where you will select the class (name) of your application and the desktop.

Otherwise, you could use wmctrl that will allow you to launch your applications and force them to go to one of your desktop.