In order to choose between what type of app indicators to use for a program, I need to detect whether I'm in a Unity desktop or not. Is this possible? Is it possible when I don't have access to the environment?
It looks like there's also XDG_CURRENT_DESKTOP:
rubiojr@rubiojr-VirtualBox:~$ echo $XDG_CURRENT_DESKTOP
Unity
See https://askubuntu.com/questions/70296/is-there-an-environment-variable-that-is-set-for-unity