electron

Cannot activate Conda environment from subprocess

女生的网名这么多〃 提交于 2020-12-31 01:40:28
问题 I am building an Electron app (running an Angular application) which acts as the User Interface for a python program underneath. The python program uses anaconda for package management (I am using miniconda for development). When the app boots up, it checks whether the required conda environment exists, and if not, creates it. The following code is part of a Service which is responsible for managing the python program. public doEnvironmentSetup() { let stdOutSub = new Subject<string>(); let

Electron: Close w X vs right click dock and quit

北战南征 提交于 2020-12-29 12:30:18
问题 In my Electron app, I would like to do something that is done very often in other OSX apps. That is... I would like to NOT close the app of the red X is clicked in the top right. But, if they right click the app icon in the dock, and say Quit, then I would like to quit the app. How do I do this? I have tried using the onbeforeunload event from the rendererProcess, as well as the browserWindow.on("close", fn) event to try and prevent this. The problem is that they both file the onbeforeunload

How to import the electron ipcRenderer in a react / webpack 2 setup

人走茶凉 提交于 2020-12-29 09:40:46
问题 using a electron, react (es6 / jsx), sass, pouchdb and webpack 2 setup. I fail to import or require ipcRenderer to make communication between main and renderer process possible. My setup can be found here: https://github.com/wende60/timeTracker Any hints how to get the ipcRenderer into a react component? Cheers, jo 回答1: I had the same problem. This solved that issue for me: Add in the webpack.config.js : const webpack = require("webpack"); module.exports = { plugins: [ new webpack

Can I bundle Pepper Flash in an Electron.js app to run Flash in 2021+?

大城市里の小女人 提交于 2020-12-29 06:36:55
问题 So, I have followed https://www.electronjs.org/docs/tutorial/using-pepper-flash-plugin and have successfully ran our Flash app inside Electron with an embedded Chrome 83 version. I have even tested setting the computer clock ahead into 2022 and confirmed it still runs Flash and avoids the Flash time bomb (Jan 12, 2021 is the Flash time bomb date according to my testing) that is built into the regular browser Flash plugins. However, am I allowed to distribute the Electron Mac & Windows

Can I bundle Pepper Flash in an Electron.js app to run Flash in 2021+?

痞子三分冷 提交于 2020-12-29 06:36:31
问题 So, I have followed https://www.electronjs.org/docs/tutorial/using-pepper-flash-plugin and have successfully ran our Flash app inside Electron with an embedded Chrome 83 version. I have even tested setting the computer clock ahead into 2022 and confirmed it still runs Flash and avoids the Flash time bomb (Jan 12, 2021 is the Flash time bomb date according to my testing) that is built into the regular browser Flash plugins. However, am I allowed to distribute the Electron Mac & Windows

Handling oauth2 redirect from electron (or other desktop platforms)

柔情痞子 提交于 2020-12-27 08:33:57
问题 This is mostly a lack of understanding of oauth2 and probably not specific to electron, however I'm trying to wrap my head around how someone would handle an oauth2 redirect url from a desktop platform, like electron? Assuming there is no webservice setup as part of the app, how would a desktop application prompt a user for credentials against a third party oauth2 service, and then authenticate them correctly? 回答1: Electron JS runs a browser instance on your localhost. Therefore, you can

Handling oauth2 redirect from electron (or other desktop platforms)

允我心安 提交于 2020-12-27 08:33:18
问题 This is mostly a lack of understanding of oauth2 and probably not specific to electron, however I'm trying to wrap my head around how someone would handle an oauth2 redirect url from a desktop platform, like electron? Assuming there is no webservice setup as part of the app, how would a desktop application prompt a user for credentials against a third party oauth2 service, and then authenticate them correctly? 回答1: Electron JS runs a browser instance on your localhost. Therefore, you can

Handling oauth2 redirect from electron (or other desktop platforms)

孤者浪人 提交于 2020-12-27 08:30:50
问题 This is mostly a lack of understanding of oauth2 and probably not specific to electron, however I'm trying to wrap my head around how someone would handle an oauth2 redirect url from a desktop platform, like electron? Assuming there is no webservice setup as part of the app, how would a desktop application prompt a user for credentials against a third party oauth2 service, and then authenticate them correctly? 回答1: Electron JS runs a browser instance on your localhost. Therefore, you can

科技爱好者周刊(第 138 期):失业难以避免,重构人生规划

烈酒焚心 提交于 2020-12-26 14:58:32
这里记录每周值得分享的科技内容,周五发布。 本杂志开源(GitHub: ruanyf/weekly ),欢迎提交 issue,投稿或推荐科技内容。 周刊讨论区的帖子 《谁在招人?》 ,提供大量程序员就业信息,欢迎访问或发布工作/实习岗位。 封面图 波士顿动力公司的机器狗生产车间,很像科幻电影的机器人军团。该公司最近以11亿美元的价格,卖给了韩国现代汽车集团。( via ) 本周话题:失业难以避免,重构人生规划 最近读到了 一段话 ,引起了我的思考。 "工作对于人生至关重要。它提供了收入,身份和意义,失业的创伤仅次于亲人的死亡。" 我完全同意这段话。因为我父母的人生就是这样,上了一辈子的班,如果把工作的部分去掉,就没有其他值得一说的东西了。 对于许多人来说,人生就是围绕着工作。上学是为了找工作,毕业是为了上班,等到退休不上班,就已经是晚年了。万一失业,生活顿时就崩溃了,就像上面的引言说的,收入、身份、意义瞬间都没了。 我今天想说的是,这种"工作型人生"已经过时了。要是现在你还把上班当作人生的主轴,是一件很危险的事情,因为失业的风险越来越大。 时代变了,稳定的工作越来越少,失业会是家常便饭,人生已经没法依附在某一份具体的工作上了。 由于经济全球化和技术进步,行业的兴衰正变得越来越快。往往几年时间,新事物就彻底取代了旧事物,比如网络淘汰了报纸杂志,电动车淘汰汽油车,自动驾驶以后会淘汰司机

Electron JS install error - Error: EACCES: permission denied

 ̄綄美尐妖づ 提交于 2020-12-26 04:03:05
问题 getting error while installing ElectronJS, Error: Error: EACCES: permission denied, mkdir '/usr/lib/node_modules/electron/.electron' command tried, sudo npm install -g electron sudo npm install -g electron-prebuilt how to resolve this permission issue? 回答1: You can try with the following command sudo npm install -g electron --unsafe-perm=true --allow-root i hope it will be work 回答2: Solved my issue by appending --unsafe-perm=true command: sudo npm install -g electron --unsafe-perm=true unsafe