This question already has an answer here:
The only Desktop Environment I ever used was Xfce, now for sheer curiosity, I have installed Kali Linux. I have clicked here and there onto the Desktop in vain hope to get an Info about the Desktop Environment itself, so I asked myself is there a standard procedure to check the name of the Desktop Environment from the command-line, I guess maybe something like:
ps -e | grep xxx
but then, I do not know what I could try to grep.
I just mentioned Kali Linux as an example, I would like to know how to do it in general.