Giter Club home page Giter Club logo

Comments (30)

pojala avatar pojala commented on May 22, 2024 11

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.

marcoms avatar marcoms commented on May 22, 2024 7

@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.

dyu avatar dyu commented on May 22, 2024 6

Have you tried?

/usr/bin/google-chrome --app=$url

from electrino.

ewnd9 avatar ewnd9 commented on May 22, 2024 6

Just for the reference what similar projects use on Linux

Update: added kapouer/node-webkitgtk

Update 2: added zserge/webview, group by language

Update 3: added node-gir, gjs, and cgjs

from electrino.

tbodt avatar tbodt commented on May 22, 2024 4

The space savings from Electrino doesn't come from using WebKit instead of Chromium, it comes from not including any browser engine.

from electrino.

tbodt avatar tbodt commented on May 22, 2024 2

You could, but then why not use Electron and save yourself some time.

from electrino.

marcoms avatar marcoms commented on May 22, 2024 2

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.

ewnd9 avatar ewnd9 commented on May 22, 2024 1

@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.

 avatar commented on May 22, 2024 1

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.

sxiii avatar sxiii commented on May 22, 2024 1

Hmm. Any luck with the linux webkit version?

from electrino.

edipox avatar edipox commented on May 22, 2024

Thank you for your suggestion @dyu but I couldn't fully understand it. Could you expand more?

from electrino.

nanaian avatar nanaian commented on May 22, 2024

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.

tbodt avatar tbodt commented on May 22, 2024

I'd rather not have different download links for different distros...

from electrino.

betoharres avatar betoharres commented on May 22, 2024

at least target to ubuntu distro, electron idea was to be cross-(common)plataform. I think targeting ubuntu first would be sufficient

from electrino.

norman784 avatar norman784 commented on May 22, 2024

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.

betoharres avatar betoharres commented on May 22, 2024

I don't know either, I mainly use macOS but I really want it to be cross-platform(on the common OSs)

from electrino.

 avatar commented on May 22, 2024

How can I use this for n Linux? Nobody said this so far.

from electrino.

tbodt avatar tbodt commented on May 22, 2024

@Jimster121 You can't, at the moment

from electrino.

 avatar commented on May 22, 2024

What about this:

/usr/bin/google-chrome --app=$url

?

from electrino.

tbodt avatar tbodt commented on May 22, 2024

@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.

 avatar commented on May 22, 2024

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.

 avatar commented on May 22, 2024

What about WebKit? Will it make any difference?

from electrino.

tbodt avatar tbodt commented on May 22, 2024

WebKit is not included with Linux.

from electrino.

 avatar commented on May 22, 2024

If it's not included with Ubuntu, then what about including it with the app?

from electrino.

 avatar commented on May 22, 2024

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.

 avatar commented on May 22, 2024

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.

 avatar commented on May 22, 2024

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.

marcoms avatar marcoms commented on May 22, 2024

@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.

 avatar commented on May 22, 2024

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.

ewnd9 avatar ewnd9 commented on May 22, 2024

@Jimster121 just explore any of the projects from my listing above #1 (comment)

from electrino.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.