I'm currently with Ubuntu GNOME 17.04 installed on my laptop and I'm trying to discover which display manager(DM) it's being used. Already tried dpkg reconfigure with lightdm, mdm and lxdm, neither of them worked.
The easiest and most painless way to view your environment is with the command:
env | grep XDG
Another choice is:
which will show a list of all running processes including the display manager. pstree should be installed as part of the standard distribution but if it isn't:
sudo apt-get install pstree
You can obtain more specific information about the windows and desktop environment with the following commands:
wmctrl will show you the name of the windows manager. You may have to install it first. wmctrl supports a rich array of fun switches.
sudo apt-get install wmctrl
These commands (except for echo $environment) all have man pages.