Merge branch 'main' into 'main'

gdesktopappinfo: Do not call xterm when it does not exist, inform the caller the launch failed

See merge request GNOME/glib!2245
This commit is contained in:
Philip Withnall 2021-09-17 10:28:44 +00:00
commit 861afbe639

View File

@ -2612,10 +2612,13 @@ prepend_terminal_to_vector (int *argc,
check = g_find_program_in_path ("rxvt"); check = g_find_program_in_path ("rxvt");
if (check == NULL) if (check == NULL)
check = g_find_program_in_path ("dtterm"); check = g_find_program_in_path ("dtterm");
if (check == NULL)
check = g_find_program_in_path ("xterm");
if (check == NULL) if (check == NULL)
{ {
check = g_strdup ("xterm"); g_debug ("Couldnt find a known terminal");
g_debug ("Couldnt find a terminal: falling back to xterm"); g_free (term_argv);
return FALSE;
} }
term_argv[0] = check; term_argv[0] = check;
term_argv[1] = g_strdup ("-e"); term_argv[1] = g_strdup ("-e");