Show HN: Nativefier – Wrap any web page natively
github.com
github.com
Some people have asked about getting a desktop version of these books which they could download locally (scholars doing fieldwork, etc). I knew something like this was possible using Electron, but I figured I'd have to build it from scratch if I wanted it.
Instead I just pointed this script at the beta version of our latest project[1] and the project built flawlessly in under a minute.
Nice work! I know that the web as a platform has its problems, but it is the only truly universal runtime we have right now, and tools like this help realize this potential more fully.
One question: is there a way to package pre-built copies as .dmg or .exe files so that non-technical users can download an app that is ready to go, without having to run the build script themselves?
Edit: It doesn't support HTTP authentication, though. Any page that is supposed to present an HTTP auth dialog just goes straight to a 401. This means I can't wrap my personal Transmission/Syncthing servers using nativefier. Edit 2: Looks like this will be fixed soon[1].
`google-chrome --user-data-dir=$XDG_CONFIG_HOME/gdocs/ --app=https://docs.google.com/` launches Chrome with a dedicated profile and in "app" mode (no browser UI, favicon as program icon, etc.), which works well for cases like this. Apparently this tool in particular works slightly differently, but the intent is comparable.
I would love that. Just one command and you're done.
This trend toward building a parred-down version of a browser into link-rich apps is actually really troublesome, from both the broken user experience (different buttons for different common tasks, back and return functions not working consistently) and from a security standpoint.
"manifoldJS helps you reach more users than ever by packaging your web experience as native apps across Android, iOS, and Windows."
This was annoying, because I wanted to use it with an app I was self-hosting, and it wasn't worth the effort of getting an SSL certifiate it would accept.
Because on Linux you can create such apps very easily with this Chrome feature, and I'm pretty sure even cookies/history is separate from the main Chrome instance.
Or is this better/different in some way?
chrome --app=http://google.com
[1]: https://github.com/kfix/MacPin [2]: https://github.com/djyde/WebShell
- CPU usage is much higher than something using WKWebView
- OS Back/Forward shortcuts don't work
- No context menus
- CMD+Click opens in your regular browser
Which makes it a no-go for me, but YMMV.
I know I could just learn Ctrl-Tab or Alt-{ or whatever to cycle through dozens of tabs, but Cmd-Tab works for me. Different strokes for different folks.
I'll probably check Nativfier out because Fluid hasn't been updated significantly in a while and uses an old renderer, and it's a bit laggy w/ HuBoard (the front-end to GitHub issues that we use at work - it's pretty JS-intensive)
nativefier "http://maps.google.com/?hl=en"If you are logged in to a Google account, the language settings on your Google account takes preference.
[0] http://headers.cloxy.net/request.php says my browser is sending "Accept-Language: en-US,en;q=0.8"
Could be a really good adoption trick if you make a web app that:
1. Lets me enter the basic info for a site I'd like to appify, e.g. app.moqups.com
2a. If successful, great, here's a download for your app (and the app is added to your list of supported web apps).
2b. Not successful: We urge to to send an email to the app creators so they can troubleshoot this issue together with us.
Also, these types of projects are puzzling at the same time. I have been under the impression (right or wrong), that people didn't like/want/need desktop apps. With these types of projects I wonder if people don't know that they want desktop apps...
I know it's a digression, but I'm curious. What do you not like about packaging of Python apps on desktop platforms?
https://discuss.atom.io/t/how-to-access-chrome-flags-in-elec...
What am I missing by having a simple web link on a desktop to any frequently accessed web page I want?
Launch it, and there I am, in Google Maps or whatever.
Does this natifier actually suck down some of the JavaScript so that it is locally hosted? If so, is there some check if the upstream software has changed and needs to be re-natified?
Thanks for the feedback about the icon issue, I'll take note of that!
I see that there are commands in the docs to do this, will try it in a bit :). Thanks!
Just tried using this for Hacker News and noticed I can't go back :(.
However, I haven't seen anything electron-based with proxy support. Any ideas on that?
Wonder if the executable file will work in other systems. For example if I create an app for google.com and move that app to another system, will it work? given that is the same OS.
Sadly, when I gave to copy to a less technical coworker (ie, without node.js installed) and it open with a blank window.
Is that expected?
For the past year or so, when thinking about software bloat, I always come back to this sad bit of dialog from the novel _Off to Be the Wizard_:
Phillip (time traveler from 1984): What on earth can a person do with 4 gigabytes of RAM?
Martin (from 2012): Upgrade it immediately.
Do we really want to make that situation even worse?
Same reason people often like to statically link. The system is guaranteed to be a moving target sooner or later, so new bugs may appear or disappear depending on a user-controlled action that's tedious to track if it's possible at all.
Bundled code, on the other hand, is a fixed, known quality against which bugs can be tested, or source inspected, or otherwise debugged in a way system libraries typically cannot.
It sucks on Linux even more. On Windows, at least everyone (including the build tools) is used to shipping dependencies, on Linux not so much.
You have all sorts of crazy dependencies on (system) libraries (not to mention libc versions), and you probably don't want to fool around with dozens of package managers (apt-get, rpm, whatever Gentoo is using, hand-rolled distros), and you pretty much don't want to store stuff in /usr/local because you might overwrite stuff already present there.
> but on Mac, why not use the system WebKit framework?
Because Chrome is far faster to pick up new stuff than Safari. Also, most people these days prefix and test only for Chrome, which disqualifies embedding a Firefox runtime.
I wanted easy cross platform compatibility with minimal code, and Electron seemed like a good choice across for apps across Windows, OSX and Linux.
On Linux, a little GTK application in C using WebKitGTK would probably work.
On Windows... I don't know. I know from firsthand that embedding the IE engine via the WebBrowser ActiveX control really sucks. I'm going to see if the WebKit WinCairo port is any good these days.
If we must use CHromium, then the Chromium Embedded Framework is worth a look. It's a DLL, so in principle, it can be shared between applications. You'd still need some platform-specific code to create the window containing CEF, though.
Good enough, is good enough. Yes, the web is not as performant as native... the question becomes; is it good enough? The bonus in wrapping Chrome is that I don't have to dive into 3 or more system level API's to get a "little application" up and running.
Which is horrible if you consider something to be a core piece of software and you are unable to effectively cmd-tab to it. This is more of an OSX issue than windows, since windows will happily alt-tab amongst browser windows. OSX uses a less intuitive cmd-` for tabbing through program instances and still requires that the webapp is running in it's own window, in the same OSX window "Space", it cannot be minimized, and which will crash with the browser itself, irrespective of which tab is truly responsible [taking all your current state data with it].
I'm all for webapps supplanting native apps. But even presenting them as such requires something like Electron, and is completely counter to the trend of managing all tabs [webapps] as crony components of a master "WebBrowser" process.
https://github.com/atom/electron/blob/master/docs/tutorial/u...
Haven't tried it but I have some sites that use flash (mostly music streaming) that aren't playing well with Electron-based apps.