This article covers the way to detect the current desktop environment of a Linux Mint 20 system as well as the method of finding the version of the current desktop environment. In fact, there are multiple options available to identify the running desktop environment on a Linux desktop.
How to Detect the Desktop Environment in Linux Command Line ?
1. First, execute the following command to check the name of the Desktop Environment:
$ echo $XDG_CURRENT_DESKTOP
2. The following command will show you the processes running for XFCE or KDE or GNOME desktops:
$ ps -e | grep -E -i "xfce|kde|gnome"