195

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?

1

10 Answers 10

173

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 Install unity-tweak-tool (sudo apt 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

7
  • 1
    Doesn't work for unity-2d :-/ Jun 30, 2012 at 22:50
  • is MyUnity require restart?
    – noisy
    Jul 31, 2013 at 14:28
  • Unity restart required.
    – Daniel
    Oct 7, 2015 at 19:20
  • 1
    For me, the solution for 13.04/14.10 worked very well for an Ubuntu 15.04...
    – Aracthor
    Oct 18, 2015 at 2:20
  • 2
    ubuntu-tweak-tool also does the job on Ubuntu 16.04
    – morhook
    Jun 23, 2016 at 17:41
66

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.

4
  • also works on 14.04
    – HongboZhu
    May 22, 2014 at 12:43
  • Well, the CCSM method works on 14.04. MyUnity doesn't appear to be available on 14.04.
    – tsbertalan
    Jun 10, 2014 at 16:39
  • Found this useful for setting in non-unity desktop environments (eg Mate) with ccsm loaded. Jun 23, 2015 at 18:02
  • Thanks! This still works in 2024. For some reason I can never remember this location, and it doesn't show up when you use the Filter field to look up "horizontal" or "desktop". Jan 10 at 2:18
49
+200

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.

1
  • 2
    confirm "method 1" via the terminal. works great and no reboot needed.
    – somethis
    Jul 15, 2013 at 14:29
7

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
1
  • 1
    It works with Ubuntu 16.04 too
    – pabloa98
    Sep 19, 2019 at 3:31
6

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

Quicklist to Add/Remove workspaces rows/columns

0
5

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.

5

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
5
  • 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, 2012 at 17:24
  • 2
    Thank you for providing the only answer that doesn't require adding more software, and addresses Unity 3D Sep 4, 2012 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 Jun 20, 2014 at 15:54
  • the simplest and the best solution Jun 25, 2014 at 7:24
  • 3
    This didn't work for 14.04. This does: askubuntu.com/a/447677/62483
    – Lucio
    Jun 25, 2014 at 18:45
2

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.

1
  • 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 W.
    Jun 30, 2012 at 20:44
1

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.

0

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.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .