Install lightdm:
sudo apt install lightdm
Install XRDP (for remote access):
sudo apt install xrdp
If error on login change to startxfce4:
sudo update-alternatives --config x-session-manager
Activate and deactivate LightDM desktop:
- $ sudo systemctl set-default multi-user
- Reboot or log out from a current session to exit GUI:$ gnome-session-quit
How to enable GUI to start on boot
Given that you have installed GUI on your Ubuntu 20.04 Server/Desktop you can enable the system to start to GUI by execution of the following command:
$ sudo systemctl set-default graphical
Start GUI manually from a command line
For a GNOME GUI installations using GDM
as a default display manager you can start GUI from a command line by executing the bellow command:
$ sudo systemctl start lightdm
Disable GUI from command line:
$ sudo systemctl set-default multi-user
Disable idleAction:
sudo nano /etc/systemd/logind.conf
Disable suspend mode:
sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target