Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linux port #1

Open
edipox opened this issue May 4, 2017 · 30 comments
Open

Linux port #1

edipox opened this issue May 4, 2017 · 30 comments

Comments

@edipox
Copy link

edipox commented May 4, 2017

What are your plans on porting it to Linux?

I think that electron apps are especially useful for Linux desktop given that we usually don't have that much third party attention compared to Windows and macOS. A good example is Wunderlist, there are Wunderlist apps for almost every platform (Windows, iOS, macOS, android, etc.. even the now dead Ubuntu Phone I think) except for Linux.. and that's why I created this project: WunderlisTux which I'd love to implement using Electrino instead of Electron.

@dyu
Copy link

dyu commented May 4, 2017

Have you tried?

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

@edipox
Copy link
Author

edipox commented May 4, 2017

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

@marcoms
Copy link

marcoms commented May 4, 2017

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

@bates64
Copy link

bates64 commented May 5, 2017

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.

@tbodt
Copy link

tbodt commented May 5, 2017

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

@betoharres
Copy link

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

@norman784
Copy link

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)

@betoharres
Copy link

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

@pojala
Copy link
Owner

pojala commented May 22, 2017

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.

@ghost
Copy link

ghost commented Jan 26, 2018

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

@tbodt
Copy link

tbodt commented Jan 26, 2018

@Jimster121 You can't, at the moment

@ghost
Copy link

ghost commented Jan 26, 2018

What about this:

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

?

@tbodt
Copy link

tbodt commented Jan 26, 2018

@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

@ghost
Copy link

ghost commented Jan 27, 2018

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?

@ghost ghost mentioned this issue Jan 27, 2018
@ghost
Copy link

ghost commented Jan 29, 2018

What about WebKit? Will it make any difference?

@tbodt
Copy link

tbodt commented Jan 29, 2018

WebKit is not included with Linux.

@ghost
Copy link

ghost commented Jan 30, 2018

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

@tbodt
Copy link

tbodt commented Jan 30, 2018

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

@ghost
Copy link

ghost commented Jan 30, 2018

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.

@tbodt
Copy link

tbodt commented Jan 30, 2018

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

@ewnd9
Copy link

ewnd9 commented Jan 31, 2018

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

@ghost
Copy link

ghost commented Jan 31, 2018

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?

@marcoms
Copy link

marcoms commented Jan 31, 2018

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.

@ghost
Copy link

ghost commented Jan 31, 2018

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.

@marcoms
Copy link

marcoms commented Feb 1, 2018

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

@ghost
Copy link

ghost commented Feb 2, 2018

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.

@ewnd9
Copy link

ewnd9 commented Feb 2, 2018

@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

@ghost
Copy link

ghost commented Feb 3, 2018

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?

@ewnd9
Copy link

ewnd9 commented Feb 3, 2018

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

davidenke pushed a commit to davidenke/electrino that referenced this issue Feb 7, 2018
Allow apps to request and/or leave fullscreen mode
@sxiii
Copy link

sxiii commented Mar 24, 2020

Hmm. Any luck with the linux webkit version?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants