User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:126.96.36.199) Gecko/20071128 SeaMonkey/1.1.7 Mnenhy/0.7.5.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:188.8.131.52) Gecko/20071128 SeaMonkey/1.1.7 Mnenhy/0.7.5.0
Windows XP handles default browsers other than its own Internet Explorer by modifying the following registry keys:
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.
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
Seamonkey launches with the error message
'The URL is not valid and cannot be loaded'
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).
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.
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.
Created attachment 294981 [details] [diff] [review]
Should jag like this I'll then find someone to test on Windows.
Comment on attachment 294981 [details] [diff] [review]
On the basis that this is OS integration ;-)
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).
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.
Though now that I think about it...we have no search service yet (which that patch uses) ;-).
We have a search service, if you'd prefer to go that way...
Guys, has anyone checked whether this still exsists on latest trunk builds?
I basically posed (what I believe to be) the same question here:
AutoRuns Search Functionality with SeaMonkey
Autoruns 9.01 with Alternative Browsers
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.)
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.
Comment on attachment 294981 [details] [diff] [review]
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).
Enabling keywords by default is IMHO a good idea anyways - hey, even Firefox does that!
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.
We should also update http://www.mozilla.org/docs/end-user/internet-keywords.html then (and move to some Wiki?).
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).