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

ls /usr/share/xsessions/