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'm very new to Ubuntu. I did this :

sudo apt-get -f install

And when I rebooted the system, I couldn't log into the system.

When I proceed with the user name and password I get a small pop-up saying :

Failed to load session Gnome  ( Log Out )

What went wrong? Are there any ways there to get back to my previous state?

Thanks in advance.

share|improve this question
What have you installed with apt-get ? And did you try to start with Unity instead of Gnome ? – NorTicUs Oct 15 '12 at 11:15
@NorTicUs: Nope – batman Oct 15 '12 at 11:17
up vote 2 down vote accepted

I think there was a dependency problem which was fixed by removing gnome session with the command sudo apt-get -f install. So, you can't log into gnome session.

Try Login in the Unity session. Click on the Ubuntu Logo next to your user name and change it to "Ubuntu"

After login, you can repair some of the missing packages by using this command

sudo apt-get install ubuntu-desktop
share|improve this answer
I can see only two option. One is Ubuntu and another one is Ubuntu 2D. There is no such thing called Unity – batman Oct 15 '12 at 11:17
@batman that is Ubuntu actually. – Anwar Shah Oct 15 '12 at 11:18
Yes doing so I can able to login. But I lost my look and feel. Are there any way to recover from here? – batman Oct 15 '12 at 11:20
You can right click on the desktop and select "Ambiance" as the theme – Anwar Shah Oct 15 '12 at 11:22
@A.S.: I got back my desktop. As far as the error is concerned I'm not sure what caused it. – batman Oct 15 '12 at 12:08

You can reinstal gnome, this world fix corrupted stuff. Just go to terminal and type:

sudo apt-get install gnome-shell

After the process completes, you will be able to log in to gnome sessions. I had the same problem today with the -f option of apt-get, and fixed it this way.

share|improve this answer
I'm getting unable to locate the package ` gnome-desktop` – batman Oct 15 '12 at 11:29
Replace it with ubuntu-desktop – Tachyons Oct 15 '12 at 11:33
Or gnome-shell for gnome. There is no package named gnome-desktop, my bad, sorry. – user91091 Oct 15 '12 at 11:34

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.