Chromium & Electron
-
Hi all,
I've been tinkering and hacking around with my Google Pixel 2 XL.
After some messing around and doing unspeakable things with the OS I managed to get Electron and Chromium to run under Libertine with Xmir and little effort outside of making it use an existing X session i.e. setting DISPLAY=:0 or another screen number, this relies on another X application to be running under Xmir to use its session, in this case I used lxterminal and ended up with Electron & Chromium displaying ontop.
I also found that at some point Chromium added support for Wayland to its "Ozone" graphics and input abstraction layer.
I'm assuming this could allow it to work with Mir?
Though my understanding of Mir is practically 0 outside it being similar to Wayland, but I could be off the mark. Running Electron results in a broken pipe and SIGABRT.Is it possible to package an application that can start its own Xmir session or how can I get Electron to play nice with Mir using Electrons upstream Wayland support?
Though this does introduce some significant overhead. Because... well, Chromium likes RAM.
Unless there's a better solution that allows NodeJS on the backend of an app presenting a HTML5 UI with communication via IPC or similar?
From poking around at Clickable, it appears to just run a command, would this allow running a shell script with a few commands, does it need to present a window etc.
I have so many questions, but the end result is the same. HTML5 applications backed with NodeJS, though I'm still looking at my options.
I suppose it's possible to use a HTML5 application and hoping webpack will work to create a full featured app.
-
There are a lot of related issues here.
Firstly, Mir is not "similar to Wayland", that confuses a protocol (Wayland) with an implementation of that protocol (Mir). Mir started out by providing an API (mirclient) to applications that API is similar to Wayland.
Mir supported both mirclient and Wayland for a while, but dropped mirclient as it is not widely used.
Ubuntu Touch uses an old version of Mir (1.8) that supports both Wayland and mirclient. But Ubuntu Touch only uses mirclient (except on PinePhone where Wayland is used, but the work to use Wayland is incomplete and the "gaps" cause problems).
Electron (and probably Chromium as it is based on the same engine) has some bugs in the way it implements Wayland and some work needed to get Electron/Wayland working with Mir 2.5.
One day Ubuntu Touch will update to a more recent version of Mir and applications based on Wayland will work. But this is not trivial (not all of the features of mirclient are available with Wayland and replacements are needed), and not as urgent as the move to Ubuntu 20.04.
-
It's natural to have many question at the begining.
If you have Telegram I would suggest you to subscribe to the app development group so you can have direct interactions with other devs who can answer the questions you might have.The topic about MIR and Wayland is a huge one and I don't understand everything.
But search the forum for Miroil there lies many answers and maybe a good project for you to contribute to.I'm busy right now, but if I don't forget, I'll try to come back and edit my post with relevant threads here on the forum.
-
There are a lot of related issues here.
Firstly, Mir is not "similar to Wayland", that confuses a protocol (Wayland) with an implementation of that protocol (Mir). Mir started out by providing an API (mirclient) to applications that API is similar to Wayland.
Mir supported both mirclient and Wayland for a while, but dropped mirclient as it is not widely used.
Ubuntu Touch uses an old version of Mir (1.8) that supports both Wayland and mirclient. But Ubuntu Touch only uses mirclient (except on PinePhone where Wayland is used, but the work to use Wayland is incomplete and the "gaps" cause problems).
Electron (and probably Chromium as it is based on the same engine) has some bugs in the way it implements Wayland and some work needed to get Electron/Wayland working with Mir 2.5.
One day Ubuntu Touch will update to a more recent version of Mir and applications based on Wayland will work. But this is not trivial (not all of the features of mirclient are available with Wayland and replacements are needed), and not as urgent as the move to Ubuntu 20.04.
-
@alan_g
Thanks for getting back to me, I did some light research this morning but I didn't get down to fully understanding the differences, I did read about that distinction but forgot!Mir and Wayland are completely new to me with only having heard of Wayland but not of Mir, any limited experience I have lies with X11.
Thats makes sense to me why it didn'twant to play ball when running directly in the main UT environment.
Regarding Xmir, is it possible to tap into that from a regular app without libertine or is this something that would be able to make it onto the Open Store due to slight differences in software between any supporting systems?
-
Why do you want to get something as horrible as Electron and Chromium running in/under/on Ubuntu Touch ?!
Please, please, PLEASE stick to Native and Google FREE apps (or even better : Native Applications) if you are considering developing something for Ubuntu Touch
-
@nero355 Again your opinion. Others are free to try what they want. It is free opensource after all. The question would have been fine if left at "why do you want to get Electron and Chromium running on UT?"
Please carry on joining in on the Forum but stop the "Please dont, i dont like, why are you bothering with that" type of comment. It's not helpful and is getting boring. Your opinion is well known now and others might not think it is necessarily the right one.
-
@lakotaubp
I happen to know plenty of developers who agree with me so maybe you should do some searching/investigating before replying something like that ?! -
@nero355 Then you are more than welcome to go and have a deep one sided conversation with them on another forum. This forum is open to all UT users who are free to use it as and for what they wish and to discuss it in a free and open forum. No one has the right here to shout down or tell someone else how to use UT.
Some ideas maybe seem impracticable not possible or many number of other things and that will come out in the discussion that is what a forum is for. Plus by telling people not to try something you don't know what might be missed. Don't narrow your options or others. It really is time to stop now. Thanks. -
@lakotaubp said in Chromium & Electron:
@nero355 Then you are more than welcome to go and have a deep one sided conversation with them on another forum. This forum is open to all UT users who are free to use it as and for what they wish and to discuss it in a free and open forum. No one has the right here to shout down or tell someone else how to use UT.
Some ideas maybe seem impracticable not possible or many number of other things and that will come out in the discussion that is what a forum is for. Plus by telling people not to try something you don't know what might be missed. Don't narrow your options or others. It really is time to stop now. Thanks.You should indeed stop your comment and read first what Electron and for example Flutter are and why they are bad for any kind of device they are used on!
Unless you do want a lot of overhead in terms of RAM and CPU usage amongst others then be my guest and use it all the time!
-
@nero355 Please see my comment above.
-
@nero355 Yo... you dont get the point. You dont have to like Electron/Flutter or whatever. UT is an open OS with a small community of developers. Discouraging people the way you do helps no one.
Electron might not be your choice of application. Fine.
Other people might like it and more options will just result in more devs being motivated to try stuff on UT.
Take my apps for example... Python + QML? An inefficient combination for sure, but it allowed me to write apps that help hundreds of people and I certanly wouldnt be writing them if someone like you would have discouraged me right from the get go and told me it was stupid when I first asked questions about it.
-
@nero355 I have tried to make allowance for English not being your primary language, (despite the extraordinary ability of the Dutch to speak better English than many natives here,) but surely you realise by now that many on this forum resent your attempts to impose your opinions and views on everyone. No amount of silly cartoon faces can soften the criticisms you regularly make.
In a free society and a free forum we all have our own opinions, and to jeer at those that do match yours is insufferable. Please either learn some tact or keep quiet, preferably the latter.
-
@aarontheissueguy said in Chromium & Electron:
Take my apps for example... Python + QML? An inefficient combination for sure, but it allowed me to write apps that help hundreds of people and I certanly wouldnt be writing them if someone like you would have discouraged me right from the get go and told me it was stupid when I first asked questions about it.
Still better than basically putting each application into it's own browser window!
I will ignore the rest of your comments because of obvious reasons...
-
@nero355 The HTML5/WebApp feature for Clickable to create UT app is quite literally putting an application in its own browser window, the only difference is the lack of NodeJS on the backend.
After some playing with regular ReactJS I've been able to make some applications, hopefully webpack will play nice with any modules I like to use in my setup, though generally it always has done.
I doubt the overhead for Electron or Chromium is going to be much different to Morph if ran on the platform due to the fact Morph utilises Qt WebEngine which has Chromium at the core.
I'm not certain what the performance tweaks are and whether they could be applied to Electron.
Ubuntu Touch does support windowed mode so being able to spawn multiple windows (assuming its supported) could be useful in that mode.
Eitherway, I got the input I needed.
Thanks for your responses everyone.
-
@majesticfudgie If you are happy with the answers then please mark as solved https://forums.ubports.com/topic/6311/how-to-ask-a-question-and-then-mark-it-as-solved it will help others looking for answers.
-
-
-
@majesticfudgie said in Chromium & Electron:
@nero355 The HTML5/WebApp feature for Clickable to create UT app is quite literally putting an application in its own browser window, the only difference is the lack of NodeJS on the backend.
I dislike those too to be honest...