Le 05/10/2011 08:17, YunQiang Su a écrit :
  I am trying to make a program has different tray in different environment:
    when indicator is supported, indicator plug-in is used,
    when in gnome-shell or gnome-panel, notification area written by  gtk
    when KDE, use the way KDE prefer,

  Then the problem is that how I can determine which are using dynamic?
  unity, gnome-shell or something else ?


You can detect Unity using dbus. There is a Bus Name com.canonical.Unity.Launcher which is there only when Unity is running. This method is 100% reliable compared to session name (DESKTOP_SESSION=ubuntu, DESKTOP_SESSION=ubuntu-2d…) which isn't cross distribution.

For other like gnome-shell, I'm not sure if something similar exists.

Didier

--
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss

Reply via email to