electron.app.relaunch doesn't work inside AppImage
See original GitHub issue- Version: 19.6.0
- Target: AppImage
Calling electron.app.relaunch()
from within an AppImage does not properly relaunch the application upon electron.app.quit()
. This is true both for the no-argument form of relaunch()
, as well as if an execPath
is provided, even if the execPath
is outside the AppImage
e.g.:
electron.app.relaunch({execPath: '/usr/bin/zenity', args: ['--info', '--text=Hello']});
electron.app.quit();
Interestingly, the relaunch()
method does work correctly if the application binary within the mounted AppImage is started directly. (e.g., run the AppImage once to cause the /tmp/.mount*
to happen, and then go into that mountpoint while the first copy is still running and execute the electron binary directly. This second directly-executed copy is able to correctly relaunch, but the first copy is not)
Issue Analytics
- State:
- Created 6 years ago
- Reactions:13
- Comments:8 (1 by maintainers)
Top Results From Across the Web
Restart electron app in new detached process - Stack Overflow
I have an electron (v17) application running in a linux (v20.04) environment as an AppImage. What I want to achieve.
Read more >Running AppImages
This page shows how a user can run AppImages, on their favorite distribution using the desktop environment tools or via the terminal.
Read more >What Is AppImage? Benefits, Drawbacks, and Getting Started
The open source AppImage tool enables developers to make their Linux software available for all Linux distributions.
Read more >Common Configuration - electron-builder
Common Configuration · in the package.json file of your project using the build key on the top level: "build": { "appId": "com.example.app" }...
Read more >probonopd/AppImageKit - Gitter
I've tried renaming teh appimager.desktop inside AppDirAssistant. ... that will run AppImages which don't have the executable bit set with read-only ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It’s my workaround:
After applying the workaround that @Skywalker13 mentioned the app did restart but I wasn’t able to execute any
sudo ...
commands anymore. (I know it’s not recommended but I use electron on raspberry pi based closed systems and need to change the hostname, touchscreen brightness, etc. from within electron.) I came up with this solution:Hopefully it will save someone some time 😃