GNOME Bugzilla – Bug 336700
gnome-terminal as preferred terminal breaks 'run in terminal' launchers
Last modified: 2006-05-09 20:34:03 UTC
+++ This bug was initially created as a clone of Bug #336542 +++ 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 ;-)
Created attachment 62440 [details] [review] default-applications-gnome-term-param.patch The patch removes the --working-directory=%f parameter.
Shouldn't the patch put the parameter in the exec_arg key?
Isn't the exec_arg key used to store just the parameter name used to execute programs? But if it doesn't hurt we can add the --working-directory option before the -x one.
(In reply to comment #3) > Isn't the exec_arg key used to store just the parameter name used to execute > programs? But if it doesn't hurt we can add the --working-directory option > before the -x one. Hrm. You're probably right :-) I should really learn to think before posting comment. So, in fact, I'm not sure anymore that there's a bug here (well, there's the libgnome one). And the --working-directory is useless here, anyway, so your patch should be correct.
I made some tests and it seems that removing --working-directory option doesn't introduce any strange effect. OK to commit the proposed patch?
This is along with a libgnome patch that allows arguments to the command if the user wishes to add them, correct?
This is related to bug #336542. Indeed keeping the option prevents gnome-terminal being launched in the correct way.
libgnome seems to be fixed (in Dapper) and adding arguments works fine. Maybe you still want to remove the --working-directory option for some other reason, but as far as I can tell it is not needed for launchers and menu items to work.
It is not needed, but the option in launchers allows dragging a directory/file to it and having gnome-terminal open in that directory.
(meaning a launcher for gnome-terminal only, not the run in terminal option)
Patch committed.