diff --git a/libmenu/desktop-entries.c b/libmenu/desktop-entries.c
index 28d0106..cae20e3 100644
--- a/libmenu/desktop-entries.c
+++ b/libmenu/desktop-entries.c
@@ -80,6 +80,7 @@ get_flags_from_key_file (DesktopEntry *entry,
   char      *tryexec;
   guint      flags;
   int        i;
+  const char *desktop;
 
   error = NULL;
   no_display = g_key_file_get_boolean (key_file,
@@ -104,6 +105,15 @@ get_flags_from_key_file (DesktopEntry *entry,
     }
 
   show_in_gnome = TRUE;
+
+  /* if the value is unset, fallback to GNOME, if the
+   * value is empty, allow all applications in the menu */
+  desktop = g_getenv ("XDG_CURRENT_DESKTOP");
+  if (desktop == NULL || desktop[0] == 0)
+    desktop = "GNOME";
+  else if (g_strcmp0 (desktop, "*") == 0)
+    goto skip_show_in_checks;
+
   strv = g_key_file_get_string_list (key_file,
                                      desktop_entry_group,
                                      "OnlyShowIn",
@@ -114,7 +124,7 @@ get_flags_from_key_file (DesktopEntry *entry,
       show_in_gnome = FALSE;
       for (i = 0; strv[i]; i++)
         {
-          if (!strcmp (strv[i], "GNOME"))
+          if (!strcmp (strv[i], desktop))
             {
               show_in_gnome = TRUE;
               break;
@@ -133,7 +143,7 @@ get_flags_from_key_file (DesktopEntry *entry,
           show_in_gnome = TRUE;
           for (i = 0; strv[i]; i++)
             {
-              if (!strcmp (strv[i], "GNOME"))
+              if (!strcmp (strv[i], desktop))
                 {
                   show_in_gnome = FALSE;
                 }
@@ -142,6 +152,8 @@ get_flags_from_key_file (DesktopEntry *entry,
     }
   g_strfreev (strv);
 
+  skip_show_in_checks:
+
   tryexec_failed = FALSE;
   tryexec = g_key_file_get_string (key_file,
                                    desktop_entry_group,
