After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 336700 - gnome-terminal as preferred terminal breaks 'run in terminal' launchers
gnome-terminal as preferred terminal breaks 'run in terminal' launchers
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: [obsolete] Preferred applications
git master
Other Linux
: Normal normal
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
Depends on: 336542
Blocks:
 
 
Reported: 2006-03-31 06:36 UTC by Vincent Untz
Modified: 2006-05-09 20:34 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
default-applications-gnome-term-param.patch (1.51 KB, patch)
2006-03-31 07:47 UTC, Luca Cavalli
committed Details | Review

Description Vincent Untz 2006-03-31 06:36:15 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 ;-)
Comment 1 Luca Cavalli 2006-03-31 07:47:17 UTC
Created attachment 62440 [details] [review]
default-applications-gnome-term-param.patch

The patch removes the --working-directory=%f parameter.
Comment 2 Vincent Untz 2006-03-31 08:51:48 UTC
Shouldn't the patch put the parameter in the exec_arg key?
Comment 3 Luca Cavalli 2006-03-31 09:03:19 UTC
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.
Comment 4 Vincent Untz 2006-03-31 09:12:16 UTC
(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.
Comment 5 Luca Cavalli 2006-04-22 23:44:44 UTC
I made some tests and it seems that removing --working-directory option doesn't introduce any strange effect. OK to commit the proposed patch?
Comment 6 Tom von Schwerdtner 2006-04-22 23:57:01 UTC
This is along with a libgnome patch that allows arguments to the command if the user wishes to add them, correct?
Comment 7 Luca Cavalli 2006-04-23 00:01:29 UTC
This is related to bug #336542. Indeed keeping the option prevents gnome-terminal being launched in the correct way.
Comment 8 Tom von Schwerdtner 2006-04-23 00:06:43 UTC
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.
Comment 9 Olav Vitters 2006-04-23 00:10:11 UTC
It is not needed, but the option in launchers allows dragging a directory/file to it and having gnome-terminal open in that directory.
Comment 10 Olav Vitters 2006-04-23 00:11:41 UTC
(meaning a launcher for gnome-terminal only, not the run in terminal option)
Comment 11 Luca Cavalli 2006-05-09 20:34:03 UTC
Patch committed.