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?
10 Answers
15.04 and later
On later versions of Ubuntu Workspaces are in the Workspace switcher. The number of desktops can be modified by installing the CompizConfig Settings Manager and changing the numbers listed under "General Options > Desktop Size".
13.04 -14.10
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
(sudo apt install unity-tweak-tool)


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

Move the slide-bars to change the number of horizontal & vertical workspaces
for example 4x1

- 174,526
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
under General Options. Do not set horizontal workspaces below 2 or the workspace switcher button won't work.


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.
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

method 3
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

Press Enter or click on the icon shown.
This then opens the application:

Navigate down the tree to org - compiz - profiles - unity - plugins - core and change the values shown.
- 174,526
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
- 374
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
- 33,215
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.
- 96,093
You could try with ccsm or myunity.
ccsm (CompizConfig Settings Manager)

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
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.
- 5,427
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.
- 18,944
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.
- 7,292