How to determine which window manager is running

sudo apt-get install wmctrl wmctrl -m