Disclaimer: This post is not originated by me. I post it here just for reason of backup.
> it’s “failed to load session”
Repair attempt.
Please open tty (virtual console, text mode only): ctrl+alt+f1
Enter:
sudo apt-get update
sudo apt-get install ubuntu-desktop
sudo apt-get -f install
sudo dpkg-reconfigure ubuntu-desktop
sudo reboot
If above wasn’t sufficient try:
sudo apt-get install gnome-session
sudo apt-get install lightdm
sudo apt-get install unity-greeter
sudo dpkg-reconfigure lightdm
## The install commands will tell self-explanatory if it’s already installed or not.
Just in case, the same can be done via recovery mode.
Press [Shift]-key right after boot to view boot menu, select recovery mode and select root shell (no need for ‘sudo’ there).
You could also view log file in either one of them in order to verify if essentials have been removed and install it again.
sudo nano /var/log/apt/history.log
Thanks Alex, you helped me out fixing my sister’s laptop’s “failed to load” issue.
(She upgraded Ubuntu while on battery and then let it run out of juice)
glad to hear that.
worked for me 🙂 thanks
unbelievable that 8 years after I still run in the same problems with ubuntu… sigh
Great, you saved my day and all my data!
Thank you very much man.
Thank you for posting this. saved me after a power supply problem while updating.
Thakns a lot
Thank you for the post. Reinstallation of the Linux kernel led to problems when an unexpected power failure occurred. Ubuntu desktop refused to load. This script worked perfectly. Thank you again!
ehi man…
you saved my life…
thanks a lot from spain.
generally, I don’t find fix-it posts to usually work for me, but this was spot on! Thank you very much. I had tried many other options, but this was the fix.
Thanks a lot, very useful 😀
Unfortunately this did not work after I uninstalled Unity 2-D in 12.04. Got a load of error messages in Recovery Mode after “apt-get update” seeming to do with inability to resolve us.ubuntu.archive.com and/or unable to parse. None of the commands worked. Sigh…… I’ll keep looking. Finding Linux solutions can be like looking for a needle in a haystack.
Sorry to hear that. The solution on this problem may differ from loads.
Thanks, that solved my problem
Working ! Tnx 🙂
Hi there man!!! Thanks so much for this information! U helped me to fix my pc!!! I almost got in panic!!! Greetz from Venezuela man!!!
It didn’t work for Greece unfortunately, but still thanks! I did learn a lot here 🙂
Thanks man, works great
Some helpful stuff out here! thanks a lot!
how do i connect internet (mobile broadband/wi-fi) in tty? i couldn’t solve the problem for that.
Thanks.. Solved my problem..! Kudos to u
I tried all of these commands but none of them worked……any other sugestion
I just updated my ubuntu 21.04 and it gives a black screen when I try to login.
I have a DELL Optiplex 9020 core i5 installed with ubuntu 12.04.
This tip is for old version Ubuntu, I suggest you to backup your files and reinstall the whole ubuntu.
Thank you……..sorted my unexpected issue this morning! 🙂