How to determine which desktop environment is installed from the shell?

ls /usr/share/xsessions/