Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I really like both Unity and Unity 2D. They currently have different issues, meaning that one does not have the issue the other has. For instance, when I play Battle for Wesnoth, then it integrates nicely with the global menu on Unity 2D, but not so well on Unity. So I tend to switch to Unity 2D while playing it, since I can then use my other monitor without switching between windowed and fullscreen mode. There are other cases as well.

However, for me, that currently means logging out and back in. I know that this isn't necessary, so I was wondering exactly what to do to switch between them in-place, without logging out.

share|improve this question
It seems someone had a bash script which was supposed to switch between the two, but a problem would occur when going back to Unity from Unity 2D in that both interfaces would run simultaneously. For that reason I don't feel it's complete enough in its current state to constitute an answer, but it might give someone else something to start with. – Christopher Kyle Horton Feb 6 '12 at 4:15
up vote 3 down vote accepted

I use a script to switch between Metacity and Unity and another to reload unity when I need to.

A probable solution would involve:


#stop Compiz and thus Unity.

killall compiz &

#make sure to kill any conflicting processes (just in case, but this is optional).

killall metacity &

#This does not always exit cleanly, so kill it with fire for surety that it is dead.
killall unity-panel-service &

#load Unity 2D.

metacity --replace&
unity-2d-shell &
unity-2d-panel &

^-- to load Unity 2D, and:

killall unity-2d-panel &
killall unity-2d-shell &
killall unity-2d-spread &
killall metacity &
unity &

^-- to load Unity 3D

You could save them as scripts in your ~/bin folder, for example as unity2dloader and unity3dloader respectively, and then simply run them from the run dialogue (alt+f2).

You could also place them in your nautilus scripts folder, and run them from the Desktop by right clicking on the Desktop, choosing the scripts menu and then the appropriate script.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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