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.

I have a load of virtual desktops running and I usually have one full screen application per desktop (so sort of like the Ratpoison WM but with an option to use it in other ways when needed). I want new windows to automatically be put in certain desktop numbers when they start up. What's the easiest way to do this?

share|improve this question
add comment

4 Answers

up vote 7 down vote accepted

If you're using Compiz, install compizconfig-settings-manager, activate the "Place Windows" plugin, and in the "Fixed Window Placement" tab, you can adjust which windows should default to which viewport.

share|improve this answer
    
+1 for fixed window placement. Easiest solution for any compiz user. This tab is found in the configuration for the Place Windows plugin under the Window management category. Of course, Place Windows needs to be enabled for this to work. –  koushik Oct 12 '10 at 15:10
    
I'm confused about viewports and workspaces -- What I see in the fixed window placement tab is X/Y viewport coordinates that don't seem to correlate to my four workspaces. –  Amanda May 20 '11 at 13:26
    
I don't see a Fixed Window Placement tab... –  RobinJ Dec 3 '11 at 18:02
add comment

You might want to take a look at the Devil's Pie tool; it is available in Ubuntu as package devilspie (apt-get install devilspie).

This article and this other one explain some of its prominent features, and provides some example code, including how to move a window to a certain workspace and maximize it.

share|improve this answer
    
You can also click here to install it. –  JanC Oct 12 '10 at 14:10
add comment

I, too have a lot of virtual desktops and a workflow that has me opening windows on different workspaces, but I've adopted an 'open and slide' approach with compiz.. right after opening an application, I use a customized shortcut to slide the new window to the appropriate workspace, then slide back to the previous workspace with another shortcut.

In my case, this is something like shift-ctrl-left arrow then ctrl-alt-right arrow.. very, very quick and I have full control over where they go every time instead of being locked-in to one configuration.

share|improve this answer
add comment

If your requirement can make use of scripts, then it might be worth investigating wmctrl eg wmctrl -s 0 would switch to desktop 0.

share|improve this answer
add comment

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.