nwjs / nw.js

Call all Node.js modules directly from DOM/WebWorker and enable a new way of writing applications with all Web technologies.
https://nwjs.io
MIT License
40.32k stars 3.89k forks source link

headless version #769

Open megablue opened 11 years ago

megablue commented 11 years ago

It would be great that if node-webkit are made into headless version...

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

damoebius commented 7 years ago

PhantomJS maintainer stepping down after Google's headless Chromium announcement

drom commented 7 years ago

Announcement itself: https://www.chromestatus.com/features/5678767817097216 Excited to see this feature in NWJS

rogerwang commented 7 years ago

Thanks. I've been watching the headless development in upstream closely. NW has been delivering whatever Chromium browser supports. So I'll see and make sure the --headless command line switch works in the first step.

Please note that in upstream, there are 2 browsers in the Chromium binary (headless, and the normal one which we've been using). When --headless is specified, Chromium will switch to and launch the headless browser instead of the normal one. The difference between the 2 browsers can be large for some users, in the same way as content shell vs the browser. It's not like that the normal browser has supported a headless mode.

So when NW supports the upstream switch in the first step, it will deliver the same thing as the upstream headless browser, not like NW apps will run in headless mode. In the 2nd step, the Node integration will be added. The NW application model and the NW API will be the last as the upstream headless browser doesn't support any extension mechanism.

rogerwang commented 7 years ago

Update: the upcoming 0.23.0 beta will support headless usage as in upstream: https://developers.google.com/web/updates/2017/04/headless-chrome https://dl.nwjs.io/live-build/04-29-2017/nw23-3bd4af6-4d7f95f-5e6428a-f2085b9/v0.23.0-beta1/

VasiliyIsaichkin commented 7 years ago

I still could not run code in headless mode (ubuntu 16.04/terminal), nw start and terminate, but code not start. I try to use script in html and set js file directly to main section in manifest: Example:

require('fs').writeFileSync('test.test','TEST');

but file not created, express server also not started

mgttt commented 7 years ago

@rogerwang dear roger, i'd like to suggest that in the "headless" mode, some mthod should be added so that the caller can demand the instance back to GUI-mode (so that the user can switch to manually mode). Yup, let compare the headless as "Auto" mode and GUI as "Manual" mode when we "drive" the vehicle

ghost commented 7 years ago

I'd love to see the ability to spawn a headless window using nw.Window.open - similar to how you have the "new-instance" flag currently.

dmouton commented 7 years ago

Hi, Is it working ? I get the latest nwjs version 0.25.4 I use headless args like that : { "name": "#name#", "version": "5.1.0", "main": "index.html", "chromium-args" : "--headless --disable-gpu --no-sandbox --disable-setuid-sandbox", "window": { "show": false } }

But i get a Gtk-WARNING : cannot open display

What's wrong ?

Thank you

faridnsh commented 6 years ago

I had success running nwjs v0.18.6 with Xvfb thanks to hauptmedia/nwjs docker image, but I couldn't make it work with the latest version with Xvfb. If anyone made it work, it'd be nice if they publish their dockerfile.

IssueHuntBot commented 6 years ago

@boostio funded this issue with $10. Visit this issue on Issuehunt

IssueHuntBot commented 6 years ago

@loadbalance-sudachi-kun funded this issue with $256. Visit this issue on Issuehunt

drom commented 5 years ago

Any update on the issue?

IssueHuntBot commented 5 years ago

@0maxxam0 has funded $2.00 to this issue.


gahubaul commented 5 years ago

Any news here ? No update since times

denim2x commented 3 years ago

I'm looking into it