22

After the restart step of upgrading Ubuntu to 18.04, tty is opening instead ubuntu-desktop. And when I enter my login name and password, I am still in the tty. This is happening again in every restart. How can I start the graphical desktop as normal?

5
  • Does it work if you press Ctrl+Alt+F7?
    – Olimjon
    May 4, 2018 at 12:12
  • It is not exited by pressing Ctrl+Alt+F7. May 4, 2018 at 12:14
  • 2
    Which desktop environment are you selecting from the gear drop down menu next to the Sifn In button? The first four options don't work for me. Only the bottom option (Unity) works for me. May 4, 2018 at 12:16
  • I didn't see any options. May 4, 2018 at 12:18
  • Using journalctl -f in a terminal and then trying to login again, I was able to see it barfed on a corrupted notifications file. Deleting this file took care of the problem. Possibly caused by a bad shutdown? I'm thinking there might be more such problems. Discovered the solution here: gitlab.gnome.org/GNOME/gnome-shell/-/issues/1552 (Using tmux to scroll back in the terminal was critical.)
    – iJames
    Jun 4, 2021 at 19:30

2 Answers 2

21

Try logging in to your default desktop environment from the tty virtual console.

  1. Open a text-only virtual console by using the keyboard shortcut Ctrl+Alt+F3.

  2. At the login: prompt type your username and press Enter.

  3. At the Password: prompt type your user password and press Enter.

  4. Now you are logged in to a virtual console, and you can run terminal commands from the console.

Run the following command:

sudo systemctl start graphical.target

If that doesn't work, switch the login display manager from gdm3 to lightdm.

sudo apt install lightdm  
sudo dpkg-reconfigure lightdm   
sudo reboot  

sudo dpkg-reconfigure lightdm will open up a new window allowing you to select lightdm as the default login display manager. Use the arrow keys to select lightdm and press the Tab key to put the focus on <OK> and press Enter. Then reboot by running this command: sudo reboot

If that doesn't work either see if you can at least switch to text mode (for troubleshooting purposes) with no GUI stuff like the X server running.

sudo systemctl start multi-user.target  
14
  • sudo systemctl start graphical.target doesn't work. Also after sudo dpkg-reconfigure lightdm nothing happened but a message was printed to the console. The message was /usr/sbin/dpkg-reconfigure: lightdm is corrupt or not fully installed. May 4, 2018 at 12:35
  • I didn't see your edited message which is about installing lightdm. I am going to try this immediately. May 4, 2018 at 12:38
  • If your lock screen goes low resolution (because of lightdm), please comment and I'll tell you how to restore the lock screen back to normal. The keyboard combination of Windows key+L may work for that better than clicking the padlock lockscreen icon.
    – karel
    May 4, 2018 at 12:53
  • Thank you very much. But the resolution of lock screen is fine as before. May 4, 2018 at 20:47
  • 1
    I was able to resolve it by going back to cli CTRL + ALT + F1 and installing ubuntu desktop sudo apt-get install ubuntu-desktop Jul 29, 2020 at 14:05
0

The commands below solved the problem on my PC:

sudo apt install lightdm  
sudo dpkg-reconfigure lightdm   
sudo reboot
sudo apt-get install compizconfig-settings-manager
DISPLAY=:0 ccsm &
sudo apt-get upgrade 

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .