code: def is_gtk_desktop():
      
      if sys.platform.startswith('linux'):
          xdg_desktop = os.environ.get('XDG_CURRENT_DESKTOP', '')
          if xdg_desktop:
              gtk_desktops = ['Unity', 'GNOME', 'XFCE']
              if any([xdg_desktop.startswith(d) for d in gtk_desktops]):
                  return True
              else:
                  return False
          else:
              return False
      else:
          return False
docs: Detect if we are running in a Gtk-based desktop