1Index: openbox-xdgmenu-0.3/openbox-xdgmenu.c
2===================================================================
3--- openbox-xdgmenu-0.3.orig/openbox-xdgmenu.c
4+++ openbox-xdgmenu-0.3/openbox-xdgmenu.c
5@@ -197,7 +197,7 @@ void process_entry(GMenuTreeEntry *entry
6 {
7     GDesktopAppInfo *appinfo = gmenu_tree_entry_get_app_info (entry);
8     char *name = g_strdup (g_app_info_get_name(G_APP_INFO(appinfo)));
9-    char *exec = g_strdup (g_app_info_get_executable(G_APP_INFO(appinfo)));
10+    char *exec = g_strdup (g_app_info_get_commandline(G_APP_INFO(appinfo)));
11     int i;
12
13     for (i = 0; i < strlen(exec) - 1; i++) {
14@@ -217,8 +217,11 @@ void process_entry(GMenuTreeEntry *entry
15         }
16     }
17
18-    g_printf("<item label=\"%s\">\n", g_strjoinv("&amp;", g_strsplit(name,"&",0))),
19-    g_printf("<action name=\"Execute\"><command>%s</command></action>\n", exec),
20+    g_printf("<item label=\"%s\">\n", g_strjoinv("&amp;", g_strsplit(name,"&",0)));
21+    g_printf("<action name=\"Execute\"><command>%s%s</command></action>\n",
22+            g_desktop_app_info_get_boolean(appinfo, G_KEY_FILE_DESKTOP_KEY_TERMINAL) ?
23+            "x-terminal-emulator -e " : "",
24+            exec);
25     g_printf("</item>\n");
26
27     g_free(name);
28