Comments (30)
Thanks for the discussion, and sorry for being slow to reply!
I was thinking of using WebKitGtk at least initially, as it's part of GTK+ which is available on the most relevant end-user distros. It seems to me that would be the closest equivalent of WebKit on Mac.
from electrino.
@edipox @dyu's solution uses Chrome which I don't think is the point of Electrino. Ideally this project should use the WebKitGtk or QtWebKit frameworks, which are commonly installed by many distros.
from electrino.
Have you tried?
/usr/bin/google-chrome --app=$url
from electrino.
Just for the reference what similar projects use on Linux
- Node.js
- JavaScript
- Python
r0x0r/pywebview
ChrisKnott/Eel
- Golang
zserge/webview
Update: added kapouer/node-webkitgtk
Update 2: added zserge/webview
, group by language
Update 3: added node-gir
, gjs
, and cgjs
from electrino.
The space savings from Electrino doesn't come from using WebKit instead of Chromium, it comes from not including any browser engine.
from electrino.
You could, but then why not use Electron and save yourself some time.
from electrino.
Looks like the best solution for Linux will be marking webkitgtk as a dependency through each package manager (apt, dnf, pacman, etc). This way at least there is a chance it would have been installed by another package previously, so it doesn't need to be downloaded again by Electrino.
from electrino.
@Jimster121 if you google --app
the first result should be https://developer.chrome.com/apps/first_app which contains a link to an examples repo https://github.com/GoogleChrome/chrome-app-samples/tree/master/samples/hello-world
To run this you need to do the following:
$ git clone https://github.com/GoogleChrome/chrome-app-samples.git
$ google-chrome --load-and-launch-app=$PWD/chrome-app-samples/samples/hello-world
(Apparently, --app
expects appId and the appropriate flag for launching from cmd is --load-and-launch-app
)
Also, there is a warning on top of Chrome Apps docs about deprecation in favor of webapps and Electron (and NW.js) https://blog.chromium.org/2016/08/from-chrome-apps-to-web.html
from electrino.
With your command Chromium was launched along with a 'Hello, World!' app which is good. Since it is launched on Chrome/Chromium it uses a huge amount of RAM. How can I use WebKit instead of Chromium? Will it make any difference on performance?
from electrino.
Hmm. Any luck with the linux webkit version?
from electrino.
Thank you for your suggestion @dyu but I couldn't fully understand it. Could you expand more?
from electrino.
I'd say use WebkitGtk or QtWebkit where possible, and use Chromium if they don't exist on the target distro - i.e. compile separately for different Linux distros.
Assuming gtk/qt aren't supported everywhere.
from electrino.
I'd rather not have different download links for different distros...
from electrino.
at least target to ubuntu distro, electron idea was to be cross-(common)plataform. I think targeting ubuntu first would be sufficient
from electrino.
I'm not 100% sure but linux distros doesn't come with a preinstalled web engine? If not electrino will need to install a compatible web engine for that distro and start running (similar to adobe air, but the main difference its that the web engine is backward compatible so you would need only the latest version)
from electrino.
I don't know either, I mainly use macOS but I really want it to be cross-platform(on the common OSs)
from electrino.
How can I use this for n Linux? Nobody said this so far.
from electrino.
@Jimster121 You can't, at the moment
from electrino.
What about this:
/usr/bin/google-chrome --app=$url
?
from electrino.
@Jimster121 1. requires google chrome to be installed 2. you could fix this by including chrome with your app but then why not use electron and save some work
from electrino.
Google Chrome is very resource heavy and this is why I am trying to find something else. Let's say that I will not use Google Chrome and use something else, how can I do it? what are the commands I have to type? Is WebKit ideal or better?
from electrino.
What about WebKit? Will it make any difference?
from electrino.
WebKit is not included with Linux.
from electrino.
If it's not included with Ubuntu, then what about including it with the app?
from electrino.
If WebKit or any other web engine can save memory usage, then I'll spend as much time as needed in order to achieve this. 😔 Electon makes way too big apps.
from electrino.
What I want is to use the default web engine of Ubuntu. If there is no default web engine that comes pre-installed then I'll need to add the engine to the project or tell the user to install it through apt
. My questions are: Will the Ubuntu's default engine save RAM/CPU? Will any other web engine that can be installed by the user save RAM/CPU? How big will be the app?
from electrino.
I was thinking of making a script that will install everything needed (including all the dependencies). So provided that I'll use WebKit which will get installed through that script, how am I going to make the app? A command was previously mentioned, but I didn't understand anything.
from electrino.
@Jimster121 this thread is not the most appropriate for individual questions, but if you install webkitgtk then you will need to include it as a library, using GTK as your toolkit.
If you just want to write web code, then you can use for example chrome and run it with the command you mentioned earlier:
/usr/bin/google-chrome --app=/path/to/your/webapp
Using your own script to install everything will not be viewed as secure by a lot of people. I'd recommend just using a package manager as mentioned.
from electrino.
I'm not an 'advanced' user, so I don't know how can I include webkitgtk as a library etc. The main problem is that I don't know where and how can I use the /usr/bin/google-chrome --app=/path/to/your/webapp
command. Should I cd
to a special folder? Should I download a package or something? Can you give some details on this? When I ran the /usr/bin/chromium-browser --app=/home/jimmy/Desktop/helloworld
command (I have chromium so I replaced that part), it just opens Chromium.
from electrino.
@Jimster121 just explore any of the projects from my listing above #1 (comment)
from electrino.
Related Issues (20)
- Merge with MacGap HOT 5
- Forward Momentum has stalled HOT 9
- Use browserify's polyfills HOT 2
- Provide a nodejs native-addon
- How to get started? HOT 5
- nodekit seems to go in the same direction than electrino
- I wonder why size is small than electron HOT 5
- Inspire with zserge/webview
- what is the state of the project HOT 18
- is electrino capable of reading files from disk? HOT 1
- Consider the use of low.js HOT 2
- Is there any plan for further development? HOT 2
- [Discussion] Project Goals HOT 6
- start HOT 1
- Start
- Limitations? HOT 4
- How To Compile HOT 2
- Show development tools HOT 1
- Adding support for Objective-C modules HOT 4
- Windows support radical Idea? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from electrino.