Option '-app' missing from Firefox above version 3

Bug #880596 reported by sdaau
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mozilla Firefox
Expired
Medium
firefox (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

$ firefox --version
Mozilla Firefox 7.0.1
$ apt-cache policy firefox
firefox:
  Installed: 7.0.1+build1+nobinonly-0ubuntu0.11.04.1
  Candidate: 7.0.1+build1+nobinonly-0ubuntu0.11.04.1
....
$ xulrunner --version
Mozilla XULRunner 2.0 - 20110402003021
$ uname -r
2.6.38-11-generic
$ lsb_release -rd
Description: Ubuntu 11.04
Release: 11.04
$ cat /etc/issue
Ubuntu 11.04 \n \l

-----
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
<email address hidden>

[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
###

* however, if I use firefox:
###
firefox -no-remote -app xultestapp/application.ini
###

... Firefox just starts as usual, ignoring the XUL application specification.

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!

Revision history for this message
In , Tempsd (tempsd) wrote :

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
<email address hidden>

[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!

Changed in firefox:
importance: Unknown → Medium
status: Unknown → New
Revision history for this message
In , Moz-jeka (moz-jeka) wrote :
Revision history for this message
In , Tempsd (tempsd) wrote :

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!

Revision history for this message
In , Moz-jeka (moz-jeka) wrote :

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"

Revision history for this message
In , sdaau (sd-imi) wrote :
Download full text (5.8 KiB)

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

Read more...

Revision history for this message
In , Moz-jeka (moz-jeka) wrote :

No response to comment 3 -> INCOMPLETE

Changed in firefox:
status: New → Expired
Revision history for this message
In , Tempsd (tempsd) wrote :

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!

Revision history for this message
Paul White (paulw2u) wrote :

Upstream bug was closed "RESOLVED INCOMPLETE" on 2011-11-20

With no further comments here or upstream for almost eight years re a
switch which appeared to work under Windows only, I'm closing this now.

Changed in firefox (Ubuntu):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.