Use XDG_CURRENT_DESKTOP.