Solution 1:

I had the same question as you because I am working on a small laptop with limited screen real estate, and I configured my touchpad to perform all of my workspace switching. I found out how to remove the icon, and it is not too involved. Please note that I am using 12.10, and this may not apply to 12.04. I am still a novice programmer and linux user, so please excuse me if I misuse any terms. Since the workspace-switcher-icon AKA the expo icon is "baked into Unity", you have to get the source code, alter it, and recompile it. The procedure is very similar to the one mentioned here:

How can I disable arbitrary default multitouch gestures in Unity?

Here is the procedure:

In terminal, enter these commands:

$ sudo apt-get build-dep unity    
$ cd /tmp
$ mkdir unity
$ cd unity

I used the tmp directory, but you could do it elsewhere.

Get the Unity source code:

$ apt-get source unity

Go to the directory "unity-6.12.0":

$ cd unity-6.12.0

Use your text editor of choice to open "LauncherController.cpp"

$ gedit /tmp/unity/unity-6.12.0/launcher/LauncherController.cpp

Press Ctl+F and seach for "workspaces". On Line 627 there is a command

bool wp_enabled = (workspaces > 1);

Change the "1" to a higher number than the number of workspaces you wish to use. For instance, I want to use 3 workspaces so I changed my entry to look like this:

bool wp_enabled = (workspaces > 4);

Save and close the LauncherController.cpp file, and then build Unity:

$ dpkg-buildpackage -us -uc -nc

It will take a few minutes. Then install the modified Unity that you just built:

$ cd ..
$ sudo dpkg -i *deb

Once it's installed you logout and log back in. Then open CCSM, go to General>General Options>Desktop Size tab, and change your number of desktops to 1. You should see the Workspace Switcher icon disappear from the Launcher. Now you can change your number of desktops back to the number you want to use, and the Workspace Switcher icon should remain hidden. You might be able to reboot and accomplish the same result, this is just what I did. You're done!

Solution 2:

Pawelki's answer regarding Compiz might work. There is no official 'Dynamic' workspace Switcher icon.

You can change the number of workspaces using Compiz or MyUnity or Ubuntu Tweak. Gnome 3 allows dynamic number of workspace which you might like, though Unity is great.

Solution 3:

To remove workspace switcher icon form Unity launcher.

  • Install CompizConfig Settings Manager

    sudo apt-get install compizconfig-settings-manager
    
  • Open Unity dash > type "compiz" > run "CompizConfig Settings Manager"

    • on the right panel click on Ubuntu Unity Plugin (it is in the Desktop group)
    • switch to third tab - "Experimental"
    • and uncheck "Show 'Expo Icon' in the launcher"

Solution 4:

An alternate workspace switcher? I don't know exactly what is wrong with the current one. I personally find it a ton more useful if you set expo to initiate upon moving your mouse to a corner, for me I have it set to the bottom right, and boom it goes to the workspace switcher (AKA expo) you can set that in the expo settings under the Compiz settings (CCSM)

If you want something more minimal like what existed in 10.04 you can try this: enter image description here

You can install that by running these codes in terminal:

sudo add-apt-repository ppa:geod/ppa-geod
sudo apt-get update
sudo apt-get install indicator-workspaces

Then run the program from the Unity dash by searching "work spaces indicator" and if you wish you could simply follow the instructions listed by others to disable the switcher Icon. Although it says it is for 11.04 you should have no problems using it in 12.04.


I got the latter information from this website: http://www.techdrivein.com/2011/05/10-useful-application-indicators-for.html