GNOME Bugzilla – Bug 336542
gnome-terminal as preferred terminal breaks 'run in terminal' launchers
Last modified: 2006-04-04 09:13:50 UTC
That bug has been opened on https://launchpad.net/distros/ubuntu/+source/control-center/+bug/36171 "Selecting gnome-termianl as my preferred terminal sets the command to: gnome-terminal --working-directory=%f I then create a launcher with the Command: ssh example.com and check 'run in terminal' Attempting to launch the launcher gives: Could not launch menu item Details: Failed to execute child process "gnome-terminal --working-directory=%f" (No such file or directory) It would seem that the --working-directory argument is unnecessary as everything seems to work fine when I choose another terminal (or a gnome-terminal as a custom command without that argument). Actually, it seems the launchers don't execute the specified command right in the preferred applications settings. If I create a custom command for the terminal: gnome-terminal --geometry=80x40 Then the nautilus terminal extension works fine and obeys the extra argument, but the launcher with 'run in terminal' selected seems to try to execute the whole command (via execve or whatever method is called) as a single command, as opposed to a command with arguments. I get the expected error: Could not launch menu item Details: Failed to execute child process "gnome-terminal --geometry=80x40" (No such file or directory) (should I file in gnome bugzilla or will malone handle the details?)"
That's a libgnome bug: in gnome_prepend_terminal_to_vector(), we do: terminal = gconf_client_get_string (client, "/desktop/gnome/applications/terminal/exec", NULL); if (terminal) { gchar *exec_flag; exec_flag = gconf_client_get_string (client, "/desktop/gnome/applications/terminal/exec_arg", NULL); if (exec_flag == NULL) { term_argc = 1; term_argv = g_new0 (char *, 2); term_argv[0] = terminal; term_argv[1] = NULL; } else { term_argc = 2; term_argv = g_new0 (char *, 3); term_argv[0] = terminal; term_argv[1] = exec_flag; term_argv[2] = NULL; } #if 0 poptParseArgvString (terminal, &term_argc, &temp_argv); term_argv = g_strdupv ((gchar **) temp_argv); g_free (terminal); #endif } It should check that terminal doesn't contain any parameter. That's also a control-center bug since it shouldn't add any parameter to the exec gconf key ;-)
Forgot to reassign.
Created attachment 62439 [details] [review] Should fix the bug Didn't have time to test the patch, but it should work.
patch works fine on my box
Commited.