0

I'm trying to get the path to the default firefox executable cross platform.

I tried the way recommended here: https://stackoverflow.com/a/24056586/1828637

However its not working on mac os or linux

on mac it shows this: https://i.stack.imgur.com/ujciZ.png

on linux (tested on ubuntu 14) it shows this: https://i.stack.imgur.com/RJCJK.png

I was hoping to get the .xpm on linux and the .icns on mac os and the .ico on windows which is the container file, meaning like not just .ico of the single 64x64 image but contain all files please.

Thanks

Community
  • 1
  • 1
Noitidart
  • 35,443
  • 37
  • 154
  • 323

1 Answers1

2

Your title and question ask two different things, which is a bit confusing. I am not clear on if you want just a way to find the Firefox executable, or a way to extract the currently used (or default?) icon from Firefox.

Icon files:

If you are just looking for a URL to use within Firefox, they should be located at:

  • chrome://branding/content/icon128.png
  • chrome://branding/content/icon64.png
  • chrome://branding/content/icon32.png
  • chrome://branding/content/icon16.png

They do not appear to exist in .ico files within the Firefox distribution. In fact there are only 4 .ico files in the entire distribution. They are all within the browser/omni.ja file at (windows assumed as primary based on your statements in prior questions):

  • chrome\browser\skin\classic\browser\customizableui\customizeFavicon.ico
  • chrome\browser\skin\classic\aero\browser\customizableui\customizeFavicon.ico
  • chrome\browser\skin\classic\browser\preferences\in-content\favicon.ico
  • chrome\browser\skin\classic\aero\browser\preferences\in-content\favicon.ico

omni.ja files are just zip format files with the extension changed to .ja instead of .zip. You can change the file extension back to .zip and read it with any appropriate archive handler.

The chrome:// URLs are:

  • chrome://skin/customizableui/customizeFavicon.ico
  • chrome://skin/preferences/favicon.ico

I think you can only get access to two of them at a time through chrome://skin/ depending on if you are using aero. If you really need access to both you could use nsiZipReader to open the actual omni.ja file.

Executable file:

You already had a batter way to get the executable file. From your comment it is:

FileUtils.getFile('XREExeF', []);
Makyen
  • 31,849
  • 12
  • 86
  • 121
  • Thanks so much for such a deep answer. The first part was extremely helpful in learning that ico/xpm/icns are not packaged with firefox. The second part is not issue I should have phrased it better, I get the executable path with `FileUtils.getFile('XREExeF', [])` :) – Noitidart Sep 24 '14 at 10:39
  • No problem. Thanks for the XREExeF info. It is *much* better.BTW: I find it helpful to copy the omni.ja archives from each release into another directory and unpack them. This makes it much easier to search through them to find files, determine how something is implemented, etc. – Makyen Sep 24 '14 at 11:02