How can I remove the Workspace Switcher launcher from the Unity dock?

link|improve this question
feedback

5 Answers

For Ubuntu 11.10 & Ubuntu2D

Edit the file /usr/share/unity-2d/launcher/Launcher.qml with your favorite text editor, ie:

sudo nano /usr/share/unity-2d/launcher/Launcher.qml

For Ubuntu 12.04 & Ubuntu2D

Edit the file /usr/share/unity-2d/shell/launcher/Launcher.qml with your favorite text editor, ie:

sudo nano /usr/share/unity-2d/shell/launcher/Launcher.qml

Locate these lines

    Component.onCompleted: {
        items.appendModel(bfbModel);
        items.appendModel(applications);
        items.appendModel(workspaces);
        items.appendModel(devices);
        shelfItems.appendModel(trashes);
    }

And change them to

    Component.onCompleted: {
        items.appendModel(bfbModel);
        items.appendModel(applications);
/*        items.appendModel(workspaces);*/
        items.appendModel(devices);
        shelfItems.appendModel(trashes);
    }

Ubuntu

Unfortunately the desktop switcher is hard coded to unity and cannot be removed without making source code modifications.

Make sure you have the package dpkg-dev installed

sudo apt-get install dpkg-dev

To modify the code and compile it your self you need to do the following

mkdir ~/code
cd ~/code
mkdir build
cd build
sudo apt-get source unity
cd unity*

Open plugins/unityshell/src/LauncherController.cpp with your favorite text editor, ie:

gksudo nano plugins/unityshell/src/LauncherController.cpp

Locate the lines

_num_workspaces = WindowManager::Default()->WorkspaceCount();
if (_num_workspaces > 1)
{
  InsertExpoAction();
}

Change them to

/*_num_workspaces = WindowManager::Default()->WorkspaceCount();
if (_num_workspaces > 1)
{
  InsertExpoAction();
}*/

Build the package

sudo apt-get build-dep unity
sudo debuild -us -uc

Wait for it to finish and install when done

cd ..
sudo dpkg -i unity*.deb libunity*.deb netbook*.deb
link|improve this answer
If users are going to use 'debuild' then you should recommend installing devscripts & they should NOT use sudo to get the source or build the package, only to install the deps & install the built packages – doug Nov 21 '11 at 6:48
Additionally - users that haven't built before will not have dpkg-dev installed so the apt-get of the source will not complete - you should get the unity build-dep before the unity source – doug Nov 22 '11 at 0:44
-.- that can easily be solved by following the instructions on the terminal, in case that proofs hard I edited the answer. – Bruno Pereira Nov 22 '11 at 0:51
feedback

11.04

Currently there's a handy little bug in unity that allows you to do this. Open a up a terminal and run 'gnome-panel'. Once gnome panel is running, add the 'workspace switcher' applet to the panel. Open up the workspace switcher preferences and select 1 column and 4 rows. Log out and back into unity, and viola! The workspace switcher is missing now.

Yes I know, it's a somewhat annoying way of removing it if you use workspaces, but it's the only way i know of right now..

enter image description here

To get the Unity launcher switcher back, simply open the gnome-panel in terminal again, and go back to a 2 X 2 grid. Logout and log back in.

link|improve this answer
1  
Removed my own answer and edited in the image I took and a method to revert back :-) – Rinzwind Jun 29 '11 at 7:52
1  
This is not a newbie friendly answer. – Roland Taylor Oct 27 '11 at 0:30
feedback

Ubuntu 11.04/11.10 workaround (does not work in Unity 2D):

  1. Install Compiz Config Settings Manager Install compizconfig-settings-manager from the Ubuntu Software Center

  2. Open Compiz Config Settings Manager from Dash

  3. Goto General Options and Desktop Size tab

  4. Change Horizontal Virtual Size to '1', the Vertical Virtual Size can be any number.

  5. Restart Unity by opening Run Command (Alt-F2) and typing unity

compizconfig

Source

link|improve this answer
Oops, must have been a last minute fix. Deleted my answer of fail. ;-) – htorque May 11 '11 at 19:32
this makes an ugly desktop wall. Then I rather live with the switcher. – wenexx May 11 '11 at 20:54
Downvoting workaround as there is now a real solution. – Jacob Johan Edwards Jan 4 at 22:53
@j-johan-edwards I think it is quite bad etiquette to downvote someone answer just because there is a better answer. The only reason you would downvote is if the answer no longer actually works. – Cas Jan 5 at 14:30
@Cas I disagree. Voting is all about sorting the best answers for users, and workarounds (especially CCSM workarounds) have a well-established tendancy of exploding in users' faces. I explained my downvote as a courtesy to you, with no intention at offense. – Jacob Johan Edwards Jan 5 at 16:47
show 1 more comment
feedback

This is, in fact, possible in 11.04, though it's a bit of a strange work-around.

Open terminal and type 'gnome-panel'. Next right click on the workspace switcher in the panel, and change your desktop to a 1X4 grid (1 column, 4 rows) now log out and back in, and the Workspace Switcher icon is no longer in the Unity launcher.

You can drop your workspaces down to 1 if you don't use multiple workspaces.

Answer found here: http://ubuntuforums.org/archive/index.php/t-1743698.html

link|improve this answer
feedback

The following worked for me…

  1. Open CompizConfig Settings Manager
  2. Open General Options
  3. Open Desktop Size
  4. Set all three sliders to 1
  5. Go Back
  6. Open Desktop
  7. Open Expo
  8. Under Use This Plugin, unselect Enable Expo
  9. Wait for desktop to reconfigure to new settings – may require log-out/restart
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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