[tor-dev] How to run a headless second Firefox instance?

Zack Weinberg zackw at panix.com
Fri Apr 25 19:19:36 UTC 2014


On Wed, Apr 9, 2014 at 12:17 PM, David Fifield <david at bamsoftware.com> wrote:
> On Wed, Apr 09, 2014 at 04:31:57PM +0100, Ximin Luo wrote:
>> On 09/04/14 07:29, David Fifield wrote:
>> > It gets the job done, but it sucks because the first thing you see is
>> > the dialog and you have to know not to close it. Is there a way to
>> > accomplish the same thing (keep the browser running, but don't show a
>> > browser window) without raising a conspicuous dialog?
>> >
>>
>> You could play further with this:
>>
>> $ nc -l -p 9999 &
>> $ iceweasel -no-remote -p testing -chrome http://localhost:9999
>
> That's an interesting idea. I didn't know about the -chrome option.
> https://developer.mozilla.org/en-US/docs/Mozilla/Command_Line_Options#Chrome
>
> Maybe in order to avoid relying on a local port, we could use an
> internal chrome:// URL that just doesn't define any UI elements, or
> something like that. I don't know too much about how the XUL overlays
> work, but it seems like it should be possible.

I *think* this .xul file suffices:

<?xml version="1.0"?>
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"></window>

There is a specific warning at
https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/window to
the effect that without more, "the window will be invisible".

I don't know how to get rid of the OSX dock icon, though.


More information about the tor-dev mailing list