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

Is there a way to have the number of workspaces automatically increase and decrease intelligently?

For example: I set a minimum of 2 workspaces, but if I have windows on those workspaces, a 3rd workspace is automatically created. If I close out the windows on workspace 2, then workspace 3 is removed.

share|improve this question
i guess this is your "solution":… – Stefan Oct 24 '12 at 16:41
possible duplicate of How can I reduce or increase the number of workspaces in Unity? – stephenmyall Oct 24 '12 at 16:47
@StephenMyall He wants something that works automatically, without having to change unity settings by hand. – Evandro Silva Oct 24 '12 at 17:43
Evandro Silva is correct – Sepero Oct 24 '12 at 17:48
Definitely not a duplicate, this is a clever idea. – Tom Brossman Oct 25 '12 at 8:51

I am guessing you are using Unity. This idea is a feature in the Gnome-3 desktop environment see the right column on the image below - workspaces are added and removed as necessary. In this case there are two, but if the user puts something in the second workspace, a third one is created.). enter image description here.

To install the gnome-shell, use these commands here:

Then, log-out and before you log back in, change your desktop by clicking on the Ubuntu icon near your login name. Here are more detailed instructions.

share|improve this answer

If you don't mind puzzling pieces together yourself, you can use wmctrland a bit of bash scripting.

  • count current workspaces: wmctrl -d | wc -l
  • change number of workspaces: wmctrl -n 4
  • check which workspaces currently have windows: wmctrl -l
  • move a window to another workspace: wmctrl -ir 0x0120017b -t 3

Tested on xfce and unity. On unity, however, wmctrl seems to be unable to move xmessage windows.

share|improve this answer

Your Answer


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.