Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Why is it that application with a long loading time (NetBeans, Eclipse etc.) does a "jump" to the current desktop, even if the process was started on another?

If I go to desktop 3 and launch an application and then go to desktop 2 while I wait, then when the application has loaded it will launch on desktop 2. Is there a way to change this?

share|improve this question
I've always had the same problem on Ubuntu and Mac OS X. I tried and couldn't find a good answer. I'm convinced there isn't one, but I hope someone proves me wrong. – Hassan Jun 7 '12 at 11:00
It depends on your window manager, you can set up groups to launch certain apps on certain pre-defined desktops. Another way is to use xnest or xephyr to run a second nested X server on 1+ of your desktops Then launch it with DISPLAY=:1 command args ... and use the -display arg if the command has one, but usually it is enough to export DISPLAY. Also if you have multiple monitors (Xinerama displays) you can use :0.0 or :0.1. Can you give a bit more detaill? – technosaurus Jun 12 '12 at 23:39
Im running a standard Ubuntu 12.04. Don't know much about windowmanager or tbh. my knowledge about linux is also very limited, but im learning :) (its my new jobs enviroment ;-) ) – Anders Metnik Jun 13 '12 at 6:32
up vote 5 down vote accepted

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. 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.

share|improve this answer
That works for ubuntu 12.04? :) – Anders Metnik Jun 14 '12 at 6:25
What works for 12.04? Do you mean Devil's Pie? It should work with every window manager which is not a filthy bastard with a tight grip on its windows. I know that it works with Metacity, and I've seen it work with Sawfish once, too. – Bobby Jun 14 '12 at 6:55

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.

share|improve this answer
+1 for wmctrl being a portable solution across flavours. – invert Jun 14 '12 at 9:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .