3

I'm on Ubuntu 17.04 and I recently installed the xdm package by accident, thinking it stands for Xtreme Download Manager. Now I have a black screen on Ubuntu. Before I log in, a window appears and it says:

Welcome to Ubuntu
login:
password:

After logging in using this black screen, I tried this command:

unity --reset

The problem is, I have lost all of my settings after running this command. And secondly, I see this black screen every time I log in.

What should I do?

Is there a way to fix this problem without removing nvidia? like:

sudo apt-get remove nvidia-*

I also tried these commends:

sudo apt-get install ppa-purge
sudo ppa-purge ppa:unity-team/staging

sudo apt-get update
sudo apt-get install --reinstall ubuntu-desktop
sudo apt-get install unity

Nothing happened!

If it matters, note that in BIOS boot menu I chose legacy mode because I'm using Kali and Ubuntu (dual boot).

terdon
  • 100,812
Sss
  • 1,022
  • Try export DISPLAY:=0 unity --replace to see what does it happen. Could be necessary to type Ctrl-Alt-F7 after that. Put ouput of this command at your question – Redbob Sep 13 '17 at 15:18
  • for this commend: export DISPLAY:=0 unity --replace ...terminal says: bash: export: 'DISPLAY:=0': not a valid identifier bash: export: '--replace': not a valid identifier – Sss Sep 13 '17 at 15:23
  • I'm voting to reopen this question because in this case, according to their own answer, OP installed an additional display manager by accident, which has little to do with the linked question. – David Foerster Sep 15 '17 at 01:15

2 Answers2

4

So you installed another display manager by accident. The packages of the major display managers in Canonical's repositories come with configuration scripts run post installation that set them as the default display manager.

You can set a different default display manager with

sudo dpkg-reconfigure [package]

where [package] is the name of the display manager package. For the “vanilla” flavour of Ubuntu 17.04 or earlier that is lightdm.

You can also remove the accidentally installed display manager:

sudo apt remove xdm

This should trigger a reconfiguration of the default display manager to whichever is still installed (though I'm not entirely sure about this).

David Foerster
  • 36,264
  • 56
  • 94
  • 147
0

Found the solution... I needed to change XDM to LightDM or to gdm3.

I solved this by running these commands:

sudo apt-get install gdm3

To install gdm3 and choose gdm3 to replace XDM

Or:

sudo dpkg-reconfigure lightdm

To replace XDM with Lightdm

Zanna
  • 70,465
Sss
  • 1,022