How to run electron apps for wayland? - electron

It seems that electron has not support wayland yet.
About electron issue: Consider providing a build for Wayland
Does anybody know how to compile electron to support wayland native? (step by step) And run electron apps in wayland(weston etc...).
It took hours to compile electron and i fail many times.

Initial Wayland support was merged in Electron 12.
There is nothing specifically about it in the release notes
but it can be tested with a recent electron version by running:
/path/to/yourElectronApplication --enable-features=UseOzonePlatform --ozone-platform=wayland
If you're using flatpack and your Electron application is Slack you need to create an override to expose the wayland socket as well as setting the GDK_BACKEND env variable to wayland.
The override will be permanently stored in ~/.local/share/flatpak/overrides
flatpak override --user --socket=wayland com.slack.Slack
GDK_BACKEND=wayland flatpak run com.slack.Slack --enable-features=UseOzonePlatform --ozone-platform=wayland

Related

How to compile a Flutter application on a docker container on Intellij Idea?

I have a full Docker image that has Flutter SDK, Android SDK, Dart SDK, etc, all installed and in the $PATH.
I made it work on Intellij Idea, I can click "deploy" and it launches, but then I don't know what else to do.
I thought Intellij Idea would work inside this container, and so it would find Dart SDK, etc, and work.
How can I compile my flutter project using the SDK from the container on Intellij Idea? And also how to use intellisense, etc, all from things inside the container
Seems like this is not something that is currently supported in IntelliJ, according to a forum-post answered by JetBrains staff.
How I see it, you have three options:
Switch to Visual Studio Code and follow these instructions
Use the in the forum-post mentioned Projector, which runs your IDE on a Server and you can connect to it using a web browser, or a Electron desktop client
Expose your SDKs from your Docker container and set the paths manually on your host system
With #3 I mean something like this, when running your container:
docker container run -itd \
-v /local/path/to/sdk:/docker/path/to/sdk \
devimage
and then in your IDE you can set the path to that, or you could even set some environment variables like e.g. ANDROID_HOME to point to the local bind location.
You may try this.
Go to File -> Project Structure
Set the path for Module, Library, Project, and SDK
Sometimes IntelliJ requires the PATH setup here.

Is IntelliJ's support for Dockerized Python environments compatible with Python running on a Windows container?

My Python project is very windows-centric, we want the benefits of containers but we can't give up Windows just yet.
I'd like to be able to use the Dockerized remote python interpreter feature that comes with IntelliJ. This works flawlessly with Python running on a standard Linux container, but appears to work not at all for Python running on a Windows container.
I've built a new image based on a standard Microsoft Server core image. I've installed Miniconda, bootstrapped a Python environment and verified that I can start an interactive Python session from the command prompt.
Whenever I try to set this up I get an error message: "Can't retrieve image ID from build stream". This occurs at the moment when IntelliJ would have normally detected the python interpreter and it's installed libraries.
I also tried giving the full path for the interpreter: c:\miniconda\envs\htp\python.exe
I've never seen any mention that this works in the documentation, but nor have I seen any mention that it does not work. I totally accept that Windows Containers are an oddity, so it's entirely possible that IntelliJ's remote-Python feature was never tested on Python running in Windows containers.
So, has anybody got this feature working with Python running on a Windows container yet? Is there any reason to believe that it does or does not work?
Regrettably, it is not supported yet. Please vote for the feature request https://youtrack.jetbrains.com/issue/PY-45222 in order to increase its priority.

Desktop integration for electron app in appImage format

I have created my electron app and built it on .deb format using electron-builder. But to enable auto-update, now I have switched into appImage format. But, for desktop integration to work, I have to use an external library as per their documentation.
As of my understanding, every user has to install AppImageLauncher for this to work. I think this is not a good method to distribute my app. Are there any suggestions?

Electron as system service with ELECTRON_RUN_AS_NODE

What is The Correct(tm) way for an Electron application to run both as a desktop application and as a service?
I have looked high and low for this but to no avail. This is how I think it should work.
Create a launchd/systemd/windows service description that:
Sets ELECTRON_RUN_AS_NODE environment variable
Runs the packaged Electron application
Produces happiness?
Can the packaged Electron application run in this manner access the contents of the ASAR file? If it can, great.
Then just build and package two directories with the application. Both compiled for the ABI version Electron is on:
Directory electron_modules with binary modules compiled for an executable that reports being electron
Directory node_modules with binary modules compiled for an executable that reports being node
With the appropriate NODE_PATH also set in the service description, I should be all golden.
Right?
I am not 100% sure what the OP is asking but I found this question while looking for: how do I run an Electron application as a desktop application and also as a CLI service with no access to a display driver?
The answer from here is
Being based on Chromium, Electron requires a display driver to function. If Chromium can't find a display driver, Electron will fail to launch ... In essence, we need to use a virtual display driver.
The solution (on linux at least)
Install xvfb
Prefix your start command with xvfb-run e.g. xvfb-run node_modules/electron/dist/electron .

ElectronJs Quick Start not starting?

I am new begin electronjs on windows, before I am used on linux not lived any problem like this.
My problem is when I am give CMD npm start then no any errors but don't opening any windows only terminal looking like this:
C:\Users\Ramazan\Desktop\electron-quick-start-master>npm start
electron-quick-start#1.0.0 start C:\Users\Ramazan\Desktop\electron-quick-start-master
electron .
And nothing, I find this subject but Why doesn't npm start run electron app? and this ElectronJs: HellowWorld application is not starting But not working vc++ 2015 already installed on my pc and I tried reinstall 5 times node_modules folder.
How can I do for this problem?
Electron doesn't support the current release of nodejs yet (v11), so people trying to use this unfortunately need to downgrade to the LTS version and it should work. I also spent almost a whole day wondering what's wrong, but this is the only thing that worked for me.

Resources