How can I determine when I am on a Unity system?

To choose which type of application indicators to use for the program, I need to determine whether I am on the Unity desktop or not. Is it possible? Is it possible when I do not have access to the environment?

+5
source share
4 answers

It looks like there is 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

+4
source

On Ubuntu, you can use the following commands:

  • echo $ DESKTOP_SESSION . This command returns ubuntu when you use Unity and ubuntu-2d when you use Unity 2D and ...
  • sudo grep " " /var/log/lightdm/lightdm.log: - Ubuntu lightdm , lightdm.log.
+3

Just shell execute ps aux | grep unity, -plattform linux. ARM.

11.04 Ubuntu , -2d-, -2d- . , linux.

+2

All Articles