Python Get Desktop Environment
import os
os.environ.get('DESKTOP_SESSION')
# OUTPUT
# 'gnome'
Troubled Tamarin
import os
os.environ.get('DESKTOP_SESSION')
# OUTPUT
# 'gnome'