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 was reading about how to get multiple workspaces in the mutter version of Unity, however since Compiz is replacing Mutter how do I go about adding and removing workspaces in Compiz version of Unity?

share|improve this question

10 Answers 10

up vote 82 down vote accepted

13.04 and later

Workspaces are by default disabled on a new install of Ubuntu v13.04.

You can toggle workspaces on/off as well as defining the number of workspaces through unity-tweak-tool Install unity-tweak-tool

enter image description here

enter image description here

12.04 install

The number of workspaces can be safely set without using CCSM through MyUnity

enter image description here

Move the slide-bars to change the number of horizontal & vertical workspaces

for example 4x1

enter image description here

share|improve this answer
1  
Doesn't work for unity-2d :-/ –  Dirk Eddelbuettel Jun 30 '12 at 22:50
    
is MyUnity require restart? –  noisy Jul 31 '13 at 14:28

In Ubuntu 14.04 CLI:

dconf read /org/compiz/profiles/unity/plugins/core/hsize
dconf read /org/compiz/profiles/unity/plugins/core/vsize

Write:

dconf write /org/compiz/profiles/unity/plugins/core/hsize 2
share|improve this answer

12.10

MyUnity has been removed from the quantal repositories pending a rewrite. It may make a reappearance at a later date.

Until then, the number of workspaces can be changed using one of four methods:

  • via the command-line
  • using Ubuntu-Tweak
  • using compiz-settings-manager (Not Recommended - use the CCSM answer if you wish to risk this route).
  • dconf-editor

method 1

If you love the terminal you can achieve the above via:

gsettings set org.compiz.core:/org/compiz/profiles/unity/plugins/core/ hsize [x]
gsettings set org.compiz.core:/org/compiz/profiles/unity/plugins/core/ vsize [y]

where [x] and [y] are numeric values

method 2

enter image description here

method 3

dconf-tools Install dconf-tools

IMPORTANT NOTE: you must have used method one or two previously for dconf-editor to show the keys to change.

The reason for this is because dconf-editor does not show relocatable schema keys by default unless they have been previously changed.

First install dconf-tools.

Then press ALT+F2 and type dconf-editor

enter image description here

Press Enter or click on the icon shown.

This then opens the application:

enter image description here

Navigate down the tree to org - compiz - profiles - unity - plugins - core and change the values shown.

share|improve this answer
2  
confirm "method 1" via the terminal. works great and no reboot needed. –  somethis Jul 15 '13 at 14:29

11.10 and below

Using CCSM

This works on Ubuntu 12.04 LTS as well, but it is easier and safer to use MyUnity instead.

Warning: ccsm can lead to unwanted effects that may be hard to overcome and may leave you without a desktop (see also this question for more background information).

The options for the number of workspaces can be found in compizconfig-settings-manager install ccsm under General Options. Do not set horizontal workspaces below 2 or the workspace switcher button won't work.

General Options

enter image description here

Using MyUnity

MyUnity can be used also in 11.10 and below, with additional steps.

In a terminal, use sudo add-apt-repository ppa:myunity/ppa && sudo apt-get update && sudo apt-get install myunity to install MyUnity. Then, use the steps described above to 12.04.

share|improve this answer
    
also works on 14.04 –  Hongbo Zhu May 22 at 12:43
    
Well, the CCSM method works on 14.04. MyUnity doesn't appear to be available on 14.04. –  tsbertalan Jun 10 at 16:39

You could try with ccsm or myunity.

ccsm (CompizConfig Settings Manager) ccsm

Open a terminal and run:

gksudo apt-get install ccsm

enter your password and enter y when asked.

Now press ALT and F2 together, type ccsm and press Enter.

When CompizConfig Settings Manager appears, select Desktop Wall.

MyUnity myunity With MyUnity you can set the number of desktops, but nothing more.

Open a terminal and run:

gksudo apt-get install myunity

enter your password and enter y when asked.

Now press ALT and F2 together, type myunity and press Enter.

When MyUnity appears, select desktop. Change H Desktop for horizontal desktops and V Desktop for vertical desktops.

share|improve this answer
1  
though 'myunity' would be safer for new users, cause if you tweak too much in 'ccsm' without knowing what you're doing you can break stuff pretty bad sometimes. –  Daniel Jun 30 '12 at 20:44

Actually, you can change desktops without using either ccsm or MyUnity. I have a script to add o remove rows and columns, but you can create a simple alias to set either one.

For example to set the number of columns, enter this at a bash prompt:

gconftool-2 --type int --set /apps/compiz-1/general/screen0/options/hsize Num_of_Cols, where "Num_of_Cols" is a number for the horizontal size, or number of columns.

For the number of rows, use vsize instead of hsize.

I originally got the script from this askubuntu article, about adding the options as quicklists to the unity launcher, but it works as a script in any menu, or as a bash function or alias.

share|improve this answer

You can open a terminal and set as you want.

With this command you set the number of horizontal viewports (at this example I am changing it to "3"):

gconftool-2 --type int --set /apps/compiz-1/general/screen0/options/hsize 3  

And with this you set the number of vertical viewports (at this example I am changing it to "4"):

gconftool-2 --type int --set /apps/compiz-1/general/screen0/options/vsize 4
share|improve this answer
    
was just about to post this.. anyways, herez a link with instructions on making a quick list to easily manage workspaces. askubuntu.com/a/46832/45659 –  Mahesh Apr 12 '12 at 17:24
2  
Thank you for providing the only answer that doesn't require adding more software, and addresses Unity 3D –  Ben Simpson Sep 4 '12 at 22:19
    
I can confirm this works for 12.04, and you can set to 1x1 in a single command and therefore removing the workspace switcher button with this singl command gconftool --set /apps/compiz-1/general/screen0/options/hsize --type=int 1 && gconftool --set /apps/compiz-1/general/screen0/options/vsize --type=int 1 –  HarlemSquirrel Jun 20 at 15:54
    
the simplest and the best solution –  RockScience Jun 25 at 7:24
    
This didn't work for 14.04. This does: askubuntu.com/a/447677/62483 –  Lucio Jun 25 at 18:45

I used CompizConfig Settings Manager (CCSM). Open CCSM, select General Options then go to the Desktop Size tab.

You can adjust the number and the layout of the workspaces by using the Horizontal Virtual Size and Vertical Virtual Size sliders to adjust the number of "columns" and "rows" respectively.

Using this method does not appear to change the settings mentioned above in gconf editor.

share|improve this answer

You could also use the newly created quicklist from me, which can be found here:

Quicklist to Add/Remove workspaces rows/columns

share|improve this answer

Install compizconfig-settings-manager, launch it through System Settings (in the Personal section), then go to General Options (in the General Section), now in the tab Desktop Size you can change the number of vertical or horizontal desktops.

share|improve this answer

protected by jokerdino Apr 28 '13 at 16:35

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

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