Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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

my ubuntu setup uses 4 virtual desktops (1 high, 4 accross). As a programmer, I almost always open the same 4 windows in the same configuration, across my 4 virtual desktops:

| Firefox | Netbeans IDE | Firefox | Spotify |

I am hoping to come up with a single command that will launch each of these programs to their corresponding window. Pseudocode might look like:

open firefox on desktop 1 to
open netbeans on desktop 2
open firefox on desktop 3 to localhost
open spotify on desktop 4

Does anyone know how I might create a simple script I could launch from my desktop to help me do this? Or at least a command parameter that causes a program to open to a specific desktop?


share|improve this question
Perhaps future users will find my script somewhat useful – Serg Apr 6 at 13:29
up vote 2 down vote accepted

Do you use Compiz? Gnome Shell?

If you use Compiz, install "compizconfig-settings-manager":

sudo apt-get install compizconfig-settings-manager

Then open CompizConfig Settings Manager, enable the "Place Windows" plugin, then click it and on the "Fixed window placement" tab, under "Windows with fixed viewport" (the last option there), select "New". Here, select the workspace on which you want the application to open. Then click the "+" sign and then click "grab", then click the middle of the window for the application you want to run on a given desktop (workspace).

If you don't use Compiz, you can do this with an application called "devilspie". If you want a GUI for it, use "gdevilspie" (search for it in Ubuntu Software Center).

And finally, if you use Gnome Shell, see THIS.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.