Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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 gmail.com
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?

Thanks!

share|improve this question

1 Answer 1

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

 
discard

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