mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-20 07:38:54 +02:00
gdesktopappinfo: Return failure rather than blindly call xterm
Instead of calling xterm when it clearly does not exist and causes a silent error, inform the user that the launch failed so they can take the right action.
This commit is contained in:
@@ -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 ("Couldn’t find a known terminal");
|
||||||
g_debug ("Couldn’t 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");
|
||||||
|
Reference in New Issue
Block a user