<html>
    <head>
      <base href="https://bugs.documentfoundation.org/">
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - get_desktop_environment() doesn't work correctly if $XDG_CURRENT_DESKTOP contains a colon-separated list of strings"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=119881#c5">Comment # 5</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - get_desktop_environment() doesn't work correctly if $XDG_CURRENT_DESKTOP contains a colon-separated list of strings"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=119881">bug 119881</a>
              from <span class="vcard"><a class="email" href="mailto:olivier.tilloy@canonical.com" title="Olivier Tilloy <olivier.tilloy@canonical.com>"> <span class="fn">Olivier Tilloy</span></a>
</span></b>
        <pre>Hi Xisco,

Without researching this further, I think what needs to happen is splitting the
value of aCurrentDesktop on colons, and iterate until we find a known DE.

In pseudo-code:

  array aCurrentDesktops = aCurrentDesktop.split(":")
  for (de in aCurrentDesktops) {
    if (de.equalsIgnoreAsciiCase("unity")) {
      ret = DESKTOP_UNITY;
      break;
    } else if (de.equalsIgnoreAsciiCase("gnome")) {
      ret = DESKTOP_GNOME;
      break;
    } else if …
  }

I can give it a try next week if you don't beat me to it.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>