Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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. –  WarriorIng64 Feb 6 '12 at 4:15
add comment

1 Answer

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
add comment

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.