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

When logging in Ubuntu 12.04 it says "Failed to load session 'unity 2-d'" and there is only an option to log out...

Now the problem occurred when I was fixing a simple medibuntu problem, after some exploring I came down to simply removing the leftover medibuntu repositories...

but, unfortunately I also followed the instructions from this answer How to remove medibuntu repository and packages?, mainly I ran this code suggested in the answer:

PKGS=$(dpkg -l | awk '{print $2}' | grep -e aacgain -e aacplusenc -e acroread-fonts -e alsa-firmware -e app-install-data-medibuntu -e apport-hooks-medibuntu -e hot-babe -e ices -e libavcodec-extra-53 -e libavdevice-extra-53 -e libav-extra-dbg -e libavfilter-extra-2 -e libavformat-extra-53 -e libavutil-extra-51 -e libdvdcss2 -e libdvdcss-dev -e libpostproc-extra-52 -e libswscale-extra-2 -e medibuntu-keyring -e mencoder -e mplayer-dbg -e mplayer-doc -e mplayer-gui -e mplayer -e non-free-codecs -e rmconverter -e w32codecs -e w64codecs | tr '\n' ' '); sudo apt-get purge $PKGS

after that, the computer was switched off, and got the before mentioned error next time it turned on. Also, there is no other session available to choose from! Only the back button...

Can all of the removed software be re-installed?

How can I repair this?

share|improve this question
Can you not use 3D? –  Tim Aug 4 '14 at 18:47
No as I said, there is no other session to choose from –  nikol Aug 4 '14 at 18:50
But 12.04 comes with just plain unity as well as 2d –  Tim Aug 4 '14 at 18:54
After i ran the command mentioned above there are no sessions to choose from ... –  nikol Aug 4 '14 at 20:46

1 Answer 1

up vote 0 down vote accepted

Yes it can be reinstalled, however, you were originally trying to get rid of that software so lets not fix this problem by settling for a problem that's not as bad. Here's how to fix the problem by installing the desktop of your choice so you can enjoy your operating system once again.

First, power up your computer and when everything seems to be booted up, press CTRL + ALT + F2 . Doing this will take you to a login screen in a text only session with no desktop. Enter your username and then your password to sign in.

After you sign in, type the following command to update your package list before installing any packages.

sudo apt-get update

Now, If you want the standard Ubuntu desktop with the Standard Unity interface, type the following command:

sudo apt-get install ubuntu-desktop

To install Gnome-Shell instead of Unity, type:

sudo apt-get install gnome gnome-shell

To install the Xubuntu desktop type:

sudo apt-get install xubuntu-desktop

To install Ubuntustudio, type:

sudo apt-get install ubuntustudio-desktop

For the Lubuntu desktop, type:

sudo apt-get install lubuntu-desktop

& for Kubuntu, type:

sudo apt-get install kubuntu-desktop

when your desired desktop is installed type this command to reboot

sudo reboot
share|improve this answer
Thanks! I didn't intend to remove the packages originally, but I figured they are obsolete (?). Anyway, will try this. Is there a way to install the 'unity 2d' again? Or will it be available when I install the ubuntu-desktop? –  nikol Aug 4 '14 at 20:20
Worked like a charm! Never mind the question in the comment, unity-2d was already installed. It seams if you remove ubuntu-desktop (like I did by accident) it causes it to not detect unity-2d... I didn't see this error anywhere else so I might post a screenshot of it later. Thanks again! –  nikol Aug 4 '14 at 21:52

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.