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

RESOLVED FIXED

Status

SeaMonkey
General
--
major
RESOLVED FIXED
10 years ago
7 years ago

People

(Reporter: Hammer, Unassigned)

Tracking

({helpwanted, imap-interop})

SeaMonkey 1.1 Branch
x86
Windows XP
helpwanted, imap-interop

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

10 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.11) 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:1.8.1.11) 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:
HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\SearchScopes
And
HKEY_CLASSES_ROOT\HTTP\shell\open\command

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"

OR

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).
(Reporter)

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.
(Reporter)

Updated

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

Comment 2

9 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

9 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)

Updated

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

Comment 4

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

On the basis that this is OS integration ;-)
Attachment #294981 - Flags: review?(bugzilla)
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).
Status: UNCONFIRMED → NEW
Ever confirmed: true
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) ;-).

Comment 8

9 years ago
We have a search service, if you'd prefer to go that way...
(Reporter)

Comment 9

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

Comment 10

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

AutoRuns Search Functionality with SeaMonkey
http://forums.mozillazine.org/viewtopic.php?t=619177

and

Autoruns 9.01 with Alternative Browsers
http://forum.sysinternals.com/forum_posts.asp?TID=13211

Might help.


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

file:///O:/SEAMONKEY/20-0122/?%20autoruns

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.)
(Reporter)

Comment 11

9 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

9 years ago
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.
Status: NEW → RESOLVED
Last Resolved: 9 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

9 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.