When Seamonkey is launched from the command line with 'seamonkey.exe "? queryterm"', it throws an error message instead of launching the default search engine and searching for 'queryterm', the expected behaviour in Windows XP



10 years ago
8 years ago


(Reporter: Hammer, Unassigned)


({helpwanted, imap-interop})

SeaMonkey 1.1 Branch
Windows XP
helpwanted, imap-interop

Firefox Tracking Flags

(Not tracked)



(1 attachment)



10 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20071128 SeaMonkey/1.1.7 Mnenhy/
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20071128 SeaMonkey/1.1.7 Mnenhy/

Windows XP handles default browsers other than its own Internet Explorer by modifying the following registry keys:
HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\SearchScopes

When a third party application requests the launch of the default internet browser (in my case seamonkey, obviously), to search for a queryterm, using that browsers default internet search engine (in my case google), the operating system will launch the default internet browser, using the following command format:
browser.exe “? queryterm”
With seamonkey this operation fails with the following error message:
‘The URL is not valid and cannot be loaded’
Trying the same with Internet Explorer, Opera or Safari is successful. Seamonkey itself also already supports using the format ‘? Queryterm’ in the addressbar, if ‘Enable Internet Keywords’ is set in preferences/Navigator/Smart Browser.

Reproducible: Always

Steps to Reproduce:
1.Open a command line (going to Start/Run/cmd and hit enter)
2.Navigate to the directory in which seamonkey is installed (e.g. C:\program files\mozilla.org\seamonkey)
3.type seamonkey.exe "? queryterm"


1. Download Process Explorer from http://www.microsoft.com/technet/sysinternals/ProcessesAndThreads/ProcessExplorer.mspx
2. Run that program
3. Highlight any process in the list
4. Hit Ctrl+M

Actual Results:  
Seamonkey launches with the error message
'The URL is not valid and cannot be loaded'

Expected Results:  
Seamonkey should launch and search for your queryterm, using the default search engine, OR if you used Process Explorer to reproduce the problem
Seamonkey should launch and search for the process that you highlighted in process explorer.

This seems like a fairly simple problem with how SM handles command line input under Windows XP (and presumably other windows versions as well).
Seamonkey should accept "? queryterm" and launch its default search engine and search for queryterm, a behavior that is already implemented when a queryterm is put into the address bar (provided that behavior has been switched on in preferences).

Comment 1

10 years ago
Addendum: I only confirmed this problem with 1.1.7, but it may also exist on the trunk as well as almost certainly in older versions of SM.


10 years ago
Severity: normal → major
Keywords: helpwanted, interop
Version: unspecified → SeaMonkey 1.1 Branch

Comment 2

10 years ago
OK, so this is techincally feasible, if you turn on the keyword.enabled prefernce, and we change some of the backend code. On the branch we would need to change several places, including the following:

navigator.js Startup() to tell loadURI to allow keyword fixup.
nsNativeAppSupportWin.cpp OpenBrowserWindow() to allow keyword fixup.

On the trunk we would only need to change nsBrowserContentHandler.js resolveURIInternal() however it would need tweaking because resolveURI has a bug and can't handle arguments including ? or # characters.

Comment 3

10 years ago
Created attachment 294981 [details] [diff] [review]
Proposed patch

Should jag like this I'll then find someone to test on Windows.
Attachment #294981 - Flags: superreview?(jag)


10 years ago
Attachment #294981 - Flags: superreview?(jag) → superreview+

Comment 4

10 years ago
Comment on attachment 294981 [details] [diff] [review]
Proposed patch

On the basis that this is OS integration ;-)
Attachment #294981 - Flags: review?(bugzilla)

Comment 5

10 years ago
BTW: One can find more info on this Windows feature under http://msdn2.microsoft.com/en-us/library/bb757032.aspx (for Vista and Server 2008).
Ever confirmed: true

Comment 6

10 years ago
Firefox handles this differently, see Bug 341405, Attachment 225606 [details] [diff]. Their patch has the advantage that it doesn't need keywords to be enabled. Neil, what do you think (like better)? :) If we use Attachment 294981 [details] [diff] here, then I think we should also enable keywords by default so that the search feature in Vista always works when SeaMonkey is the default browser.

Comment 7

10 years ago
Though now that I think about it...we have no search service yet (which that patch uses) ;-).

Comment 8

10 years ago
We have a search service, if you'd prefer to go that way...

Comment 9

10 years ago
Guys, has anyone checked whether this still exsists on latest trunk builds?

Comment 10

10 years ago
I basically posed (what I believe to be) the same question here:

AutoRuns Search Functionality with SeaMonkey


Autoruns 9.01 with Alternative Browsers

Might help.

On the trunk, seamonkey.exe "? autoruns" opens the URL:


and proceeds to provide a directory listing of the current directory.

Actually I'm not sure I understand the reasoning for the construct "? search_item"?  From a command line, seamonkey.exe URL should & will open URL.  Called from a third party application is different cause it will be using constructs found in the Windows Registry.

(I'm not in a position to set SeaMonkey 2.0a as my default browser to confirm whether AutoRuns/ProcessExplorer will work correctly, though based on my findings on a "mule", it appears not.)

Comment 11

10 years ago
@ Rube:
The reasoning behind the ? queryterm construct is that it will allow Microsoft to jerk around non-IE browsers. We only have two choices:
1) Implement it OR
2) Watch people switch back to IE
Luckily this seems to be a fairly simple fix. However, I strongly believe this should be done even for the next 1.1.x security fix as it affects usability quite a bit.

Hammer :)
Comment on attachment 294981 [details] [diff] [review]
Proposed patch

r+ but only when we then enable keywords by default. Because then we can really integrate better on Windows Vista (and not only works for some users and for others not).
Attachment #294981 - Flags: review?(bugzilla) → review+

Comment 13

10 years ago
Enabling keywords by default is IMHO a good idea anyways - hey, even Firefox does that!

Comment 14

10 years ago
Fix checked in. New trunk 2.0a1pre builds should now support "? queryterm".

As I mentioned in comment 2, it would be rather harder to fix 1.1.x builds.
Last Resolved: 10 years ago
Resolution: --- → FIXED
We should also update http://www.mozilla.org/docs/end-user/internet-keywords.html then (and move to some Wiki?).

Comment 16

10 years ago
getting those end user docs somewhere else is in discussion elsewhere - I'd be so happy if someone would want to take on the task of working with Mozilla people to get something sumo-like up and running for us (and probably seeded with those docs).
You need to log in before you can comment on or make changes to this bug.