Live data from Hacker News

Headless mode in Firefox

developer.mozilla.org

11–20 of 191 posts

Re: Headless mode in Firefox

#11
post #3

As a UI designer, I dream of strike headless strike chromeless browsers, where the UI appears when you need it, intuitively, even when NOT in full screen. The top bar simply takes too much unnecessary space. If there's any dev that wants to collaborate on this, let me know :)

I used to achieve this by using a tiling window manager (i3).

In i3, if you run firefox normally it opens up in a pane, if you choose full screen (f11) inside firefox, it fills up the entire pane. In the other panes you can still keep your other windows, such as emacs, file browser, terminal etc.

Re: Headless mode in Firefox

#12
post #2

Note that this works in the latest release only on Linux - Windows and OS X support is coming in the next release in a few weeks.

> Headless Firefox works on Fx55+ on Linux, and 56+ on Windows/Mac.

Edit: so people know what versions are pegged.

Re: Headless mode in Firefox

#13

since you're setting the environment variable to be headless what happens if you're browsing with Firefox while running your automated process?

You don't need to set all your environment variables in your bashrc, if that's not obvious. They're not global state. You can change them on a per-terminal basis, and that only effects the environment of that one terminal.

Firefox does some weird stuff with multiprocessing, where if you run the firefox command twice you only get one process. I don't know how that would effect things, but I imagine just setting the env variable and running as a different firefox profile would do it.

There's always firejail/firewarden, if you need a quick and easy sandbox for a program you already have installed, and that will solve that problem, if it is a problem.

Re: Headless mode in Firefox

#14
post #3

As a UI designer, I dream of strike headless strike chromeless browsers, where the UI appears when you need it, intuitively, even when NOT in full screen. The top bar simply takes too much unnecessary space. If there's any dev that wants to collaborate on this, let me know :)

Sounds like a great idea. My skills aren't quite up to UI design collaboration standards but I guess I am curious as to how you would build and implement such a browser?

Re: Headless mode in Firefox

#15
post #3

As a UI designer, I dream of strike headless strike chromeless browsers, where the UI appears when you need it, intuitively, even when NOT in full screen. The top bar simply takes too much unnecessary space. If there's any dev that wants to collaborate on this, let me know :)

A small nomenclature clarification seems to be in order:

"Headless" means without output. It is often used to describe servers without any attached monitors (the monitor would be the head that it is missing), but can similarly be used to describe browsers that do not even create a window on your desktop. It simply runs as a service that can be scripted.

What you are looking for, I would rather call "chromeless". The browser is there, but it has no visible UI-components outside of the webpage.

Re: Headless mode in Firefox

#16
post #7
post #5

Earlier quoted context omitted.

From a security POV, the URL being displayed at all times is absolutely necessary in order to avoid phishing.

I think there are certain elements that can be displayed differently. So maybe semi-headless is the solution.

Sounds like any browser when full-screened on macOS.

Re: Headless mode in Firefox

#17
post #6

Can you tell Firefox to print in headless mode? I want to write reports using HTML and JS, but printing is always an issue.

You can generate pdfs with headless Chromium/Chrome pretty easily[1].

    chromium-browser --headless --disable-gpu --print-to-pdf=output_file_name.pdf file:///path/to/your/html
[1] https://developers.google.com/web/updates/2017/04/headless-c...

Re: Headless mode in Firefox

#18
post #5
post #3

As a UI designer, I dream of strike headless strike chromeless browsers, where the UI appears when you need it, intuitively, even when NOT in full screen. The top bar simply takes too much unnecessary space. If there's any dev that wants to collaborate on this, let me know :)

From a security POV, the URL being displayed at all times is absolutely necessary in order to avoid phishing.

Or popups? Just imagine how realistic I could make a popup box seem know people will just think that it is from the operating system which I can also detect in another headless window along with another transparent window for bitcoin mining...I think you get the idea. UX yeah this is neat for appliances it will make for more seamless experiences, lets just hope you all are sanitizing inputs and building in secure methods of auth to make the experience worth the risk.

Re: Headless mode in Firefox

#19
post #3

As a UI designer, I dream of strike headless strike chromeless browsers, where the UI appears when you need it, intuitively, even when NOT in full screen. The top bar simply takes too much unnecessary space. If there's any dev that wants to collaborate on this, let me know :)

If you want this, just press F11 on firefox. Or select from the menu: View / Full Screen. But this has nothing to do with a headless browser.

Re: Headless mode in Firefox

#20
post #3

As a UI designer, I dream of strike headless strike chromeless browsers, where the UI appears when you need it, intuitively, even when NOT in full screen. The top bar simply takes too much unnecessary space. If there's any dev that wants to collaborate on this, let me know :)

That's not headless, it's chromeless.

Anyway, IE11 on Windows 8 (tablet mode) had that, and it was amazing (assuming you used the touch screen, that is - the UX wasn't so fantastic with a mouse).

It's the only thing from Windows 8 I miss in Windows 10.

Post reply on HN