GNOME Bugzilla – Bug 90592
Preferred Applications: %s not stubstituted
Last modified: 2003-05-12 12:22:36 UTC
Description of Problem: %s does not always seem to be replaced properly in the command line for the web browser command (and probably others). The problem probably has to do with the parenthesis used in these examples: /opt/mozilla/mozilla -remote 'openURL(%s)' /opt/mozilla/mozilla -remote openURL\(%s\) Although both versions of the command work fine from a terminal, when clicking on a link in Balsa (also tried from Gnome-terminal), Mozilla instead tries to load 'www.%s.com'. In an attempt to circumvent this, I wrote a small script that looks like: #!/bin/sh /opt/mozilla/mozilla -remote openURL\($*\) At which point things seem to work a lot better. My apologies if I've filed this in the wrong spot. I'm not sure which underlying library is responsible for this (gnome-vfs perhaps?)
I think this is libgnome or something- not sure.
-maint: can someone say if this bug is really meant to be in control-center per Luis' comment?
SPAM as discussed last night. Search for 'SPAM as discussed last night' to catch these all and delete them. :)
*** Bug 98513 has been marked as a duplicate of this bug. ***
The problem is in gnome-libs-1.4.X/libgnome/gnome-url.c around line 144. The code there is something like this: for(i = 0; i < argc; i++) { if(strcmp(argv[i], "%s") == 0) argv[i] = (char *)url; } So "%s" only gets replaced if it gets picked up as a distinct item in argv, ie you need to place spaces around it. This works to open urls in a new tab: gnome-moz-remote --remote=openURL( "%s" , new-tab)
Moving to libgnome then. It would be really nice to get this fixed soon-ish.
I hope it is appropriate to make this comment here: If I add "gnome-moz-remote --remote=openURL( "%s" , new-tab)" to ~/.gnome/Gnome, for instance in the line: "default-show=gnome-moz-remote --remote=openURL( "%s" , new-tab)" or in the line: "ghelp-show=gnome-moz-remote --remote=openURL( "%s" , new-tab)" mozilla will correctly open the requested help-page or url, but always in an new-window. Actually, as far as I can see, any "line" in ~/.gnome/Gnome that manages to open an page using gnome-moz-remote will always open the url or help-page in a new window, regardless of the parameters used. (It seems you might just as well simply use "gnome-moz-remote "%s"".) Of course, this behaviour can hardly be considered more than a minor bug. Do keep up the good work!
*** Bug 99257 has been marked as a duplicate of this bug. ***
*** Bug 107224 has been marked as a duplicate of this bug. ***
There's been some work in libgnome lately in this area. Probably worth checking out the next libgnome release to see if that changes anything.
I don't think gnome-moz-remote is there any more.