← Back to team overview

desktop-packages team mailing list archive

[Bug 880596] Re: Option '-app' missing from Firefox above version 3

 

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!

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to firefox in Ubuntu.
https://bugs.launchpad.net/bugs/880596

Title:
  Option '-app' missing from Firefox above version 3

Status in The Mozilla Firefox Browser:
  New
Status in “firefox” package in Ubuntu:
  New

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
  ID=xultestapp@xxxxxxxxxxx

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

To manage notifications about this bug go to:
https://bugs.launchpad.net/firefox/+bug/880596/+subscriptions


References