Skip to the content.

System Graphical User Interface (GUI) Error and Solutions

It seems that during the package removal process, a critical system component might have been damaged. As a result, the graphical user interface (GUI) might have broken, and you are left with access only to the terminal.

To restore the GUI and fix missing packages, follow the steps below:


1. Update System and Fix Missing Packages

Run the following commands in the terminal to try and repair any missing or broken packages:

sudo apt update
sudo apt install -f
sudo dpkg --configure -a

If the system is operational, these commands may restore missing dependencies.


2. Reinstall GNOME or Desktop Environment

If the GUI is completely removed, you may need to reinstall the desktop environment. For Ubuntu, to reinstall the GNOME desktop environment, use:

sudo apt install ubuntu-desktop

3. Restart Graphical Session

If the graphical session is broken, try restarting the display manager (e.g., gdm or lightdm):

sudo systemctl restart gdm

or

sudo systemctl restart lightdm

This will attempt to restart the graphical login and desktop environment.