Closed
Bug 696687
Opened 15 years ago
Closed 14 years ago
Option '-app' missing from Firefox above version 3
Categories
(Firefox :: General, defect)
Tracking
()
RESOLVED
INCOMPLETE
People
(Reporter: tempsd, Unassigned)
References
Details
User Agent: Mozilla/5.0 (X11; Linux i686; rv:7.0.1) Gecko/20100101 Firefox/7.0.1
Build ID: 20110928134238
Steps to reproduce:
There has been an '-app' command line option for Firefox, which should have been introduced in Firefox 3:
http://arstechnica.com/open-source/news/2007/08/using-firefox-3-as-a-xul-runtime-environment.ars
... which would have allowed Firefox to run XUL application via `firefox -app /path/to/application.ini`.
However, that switch does not seem to work any longer in newer Firefoxes:
http://stackoverflow.com/questions/5900814/does-the-app-command-line-option-work-properly-in-firefox-4
http://stackoverflow.com/questions/7869546/single-file-app-with-xulrunner-possible
I have performed the following test in Firefox 7 (versions as given above):
* Generate a small XUL application (bash):
###
mkdir xultestapp
mkdir -p xultestapp/chrome/content
mkdir -p xultestapp/defaults/preferences
cat > xultestapp/application.ini <<"EOF"
[App]
Vendor=XULTest
Name=xultestapp
Version=1.0
BuildID=20111024
ID=xultestapp@xultest.org
[Gecko]
MinVersion=1.8
MaxVersion=2.*
EOF
cat > xultestapp/chrome/chrome.manifest <<"EOF"
content xultestapp content/
EOF
cat > xultestapp/chrome.manifest <<"EOF"
manifest chrome/chrome.manifest
EOF
cat > xultestapp/defaults/preferences/prefs.js <<"EOF"
pref("toolkit.defaultChromeURI", "chrome://xultestapp/content/main.xul");
EOF
cat > xultestapp/chrome/content/main.xul <<"EOF"
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<window id="main" title="xultestapp" width="300" height="300" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<caption label="Hello World"/>
<separator/>
<button label="More >>" />
<separator/>
<description id="more-text" hidden="true">This is a simple XULRunner application. XUL is simple to use and quite powerful and can even be used on mobile devices.</description>
</window>
EOF
###
* and now if I call xulrunner, it works:
###
xulrunner xultestapp/application.ini
###
Actual results:
* however, if I use firefox:
###
firefox -no-remote -app xultestapp/application.ini
###
... Firefox just starts as usual, ignoring the XUL application specification.
Expected results:
Firefox should have ran the XUL application just like xulrunner did.
----
Can anyone explain if/when/why was this option removed - and if there is a similar functionality in newer Firefoxes?
Many thanks in advance,
Cheers!
See Also: → https://launchpad.net/bugs/880596
https://developer.mozilla.org/en/Firefox_4_for_developers#Remote_XUL_support_removed
isn't it this issue?
| Reporter | ||
Comment 2•15 years ago
|
||
Thanks for that link, @j.j.!
However, here is the text referred in https://developer.mozilla.org/en/Firefox_4_for_developers#Remote_XUL_support_removed:
> Remote XUL support removed
> Remote XUL is no longer supported; this affects XUL documents being served
> through HTTP; also, you can no longer load XUL documents using file:// URLs
> unless you create the preference dom.allow_XUL_XBL_for_file and set it to
> true. There is, however, a whitelist feature that can be used to allow
> specific domains to load remote XUL. The Remote XUL Manager extension lets
> you manage this whitelist.
... and it doesn't mention the '-app' command switch anywhere?! It just mentions "Remote XUL" - but the file I'm reading is local? Is the '-app' command line option related to "Remote XUL"??
Or does "XUL file on the local PC" mean "Remote XUL"?? If so, and a local file means "Remote XUL" - then how would we call a XUL file served over http?
Thanks in advance for any clarifications,
Cheers!
I'v no idea of this issues to begin with, but:
> ... and it doesn't mention the '-app' command switch anywhere?! It just
> mentions "Remote XUL" - but the file I'm reading is local?
it mentions file://URLs which are locale files
> unless you create the preference dom.allow_XUL_XBL_for_file
have you done this?
- type about:config in URL bar
- confirm the warning
- rightclick into the table of prefs
- select "new -> boolean"
- type in dom.allow_XUL_XBL_for_file
- select "true"
No response to comment 3 -> INCOMPLETE
Status: UNCONFIRMED → RESOLVED
Closed: 14 years ago
Resolution: --- → INCOMPLETE
sdaau added the following comment to Launchpad bug report 880596:
Hi @j.j/Moz-jeka,
Thanks for your response - and sorry I couldn't get back to this issue earlier.. (I'll try to post from Launchpad.net, and see if the post makes it to Mozilla Bugzilla).
>> ... and it doesn't mention the '-app' command switch anywhere?! It just
>> mentions "Remote XUL" - but the file I'm reading is local?
>
> it mentions file://URLs which are locale files
Yes, but I'm not trying to load a local file in Firefox via file://URL - I'm trying to specify it on the command line as an argument - in a context where that file should be ran as a XUL application...
> have you done this?
> - type about:config in URL bar
> - confirm the warning
> - rightclick into the table of prefs
> - select "new -> boolean"
> - type in dom.allow_XUL_XBL_for_file
> - select "true"
Now I have - I also closed firefox (now v8), and tried again (with the same application code listed in the OP):
$ firefox -no-remote -app xultestapp/application.ini
... and again, the -app switch is ignored; "application.ini" is not started - and instead the usual Firefox is started.
Now, in the meantime, I decided to also try firefox 3 on Linux - and it behaves the exactly same way ! Which made me wander a bit about that ArsTechnica article ... then again, I remembered I have in fact used 'firefox -app' before - under Windows!
So, I got the Windows release of Firefox 3:
http://download.mozilla.org/?product=firefox-3.6.24&os=win&lang=en-US
... and ran this installer under Wine - and installed to a custom directory. Finally, I call:
$ ./firefox.exe -app /path/to/xultestapp/application.ini
This starts up wine (and it even converts the absolute Unix path on the command line) - and what do you know, application.ini starts!
----
So, in brief - is it possible that the -app switch is implemented *only* for Windows? It could make sense, I guess - on Ubuntu, both Firefox and xulrunner are installed by default. But then, a Linux user of a XUL application would have to use this command to run it:
xulrunner xultestapp/application.ini
... and a Windows user would typically not be expected to have xulrunner installed, so they would be expected to use:
firefox.exe -app xultestapp\application.ini
... is that correct? If so, where is this documented?
To confirm this, I just ran the install for the Windows Firefox 8 under wine too, and again I try:
$ ./firefox.exe -app /path/to/xultestapp/application.ini
... and now I get an alert window, with title "XULRunner", and message:
Error: Platform version '8.0' is not compatible with
minVersion >= 1.8
maxVersion <= 2.*
(which refers to the differing version numbers of latest xulrunner (2) vs. latest Firefox (8)) - and application.ini refuses to run; however, firefox doesn't start up either! Which for me confirms that the Windows version of Firefox does indeed acknowledge the '-app' switch (v3-8) - while the Linux one doesn't.
By the way, neither the Windows nor the Linux version do not report the -app switch as existing - here is windows v3 (under wine):
$ ./firefox3win/firefox.exe --help
fixme:system:SetProcessDPIAware stub!
fixme:process:SetProcessDEPPolicy (1): stub
Usage: Z:\path\to\firefox3win\firefox.exe [ options ... ] [URL]
where options include:
-h or -help Print this message.
-v or -version Print Firefox version.
-P <profile> Start with <profile>.
-migration Start with migration wizard.
-ProfileManager Start with ProfileManager.
-no-remote Open new instance, not a new window in running instance.
-UILocale <locale> Start with <locale> resources as UI Locale.
-safe-mode Disables extensions and themes for this session.
-console Start Firefox with a debugging console.
fixme:iphlpapi:NotifyAddrChange (Handle 0x12fe980, overlapped 0x12fe964): stub
-jsconsole Open the Error console.
-browser Open a browser window.
-private Enable private browsing mode.
-setDefaultBrowser Set this app as the default browser.
... and here is Linux v3:
$ ./firefox3/firefox --help
Usage: ./firefox3/firefox-bin [ options ... ] [URL]
where options include:
X11 options
--display=DISPLAY X display to use
--sync Make X calls synchronous
--no-xshm Don't use X shared memory extension
--xim-preedit=STYLE
--xim-status=STYLE
--g-fatal-warnings Make all warnings fatal
Firefox options
-h or -help Print this message.
-v or -version Print Firefox version.
-P <profile> Start with <profile>.
-migration Start with migration wizard.
-ProfileManager Start with ProfileManager.
-no-remote Open new instance, not a new window in running instance.
-UILocale <locale> Start with <locale> resources as UI Locale.
-safe-mode Disables extensions and themes for this session.
-jsconsole Open the Error console.
-browser Open a browser window.
-private Enable private browsing mode.
-setDefaultBrowser Set this app as the default browser.
Pretty much the same options for both --- and "-app" is reported nowhere!
----
Why this is relevant for me is that I'd like to develop a XUL application, and leave decent instructions on how to run it; especially since often I run different Linuxes which may not have neither Firefox (nor xulrunner) installed - and here I often download Firefox from Mozilla, unpack it and use it; and it would have been very convenient not to rely on additional xulrunner download. That is why I wanted to rely on the '-app' switch - which now, I guess, is an option only available for Windows users (and even a buggy one for the latest Firefox 8 release, since it cannot make the difference between the xulrunner and firefox versions).
If I understood this correctly - then I guess this would be a documentation bug of sorts, because I cannot find any references for '-app' being a Windows-only feature; if anyone knows of a link discussing that, it will be much appreciated!
Many thanks again for the feedback,
Cheers!
--
http://launchpad.net/bugs/880596
| Reporter | ||
Comment 6•14 years ago
|
||
Hi again,
Just wanted to say sorry it took so long - I posted the above reply on Launchpad on 2011-11-17; bug was made incomplete on 2011-11-20; and my reply arrived on 2011-11-23 :) Like in the snail-mail days :)
Anyways, I don't really have much to add, except that it looks like the -app switch was only ever properly working on Firefox 3 for Windows only ... If someone can just confirm if this is the way thins are supposed to be, that would be great!
Thanks again - and cheers!
You need to log in
before you can comment on or make changes to this bug.
Description
•