question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Linux AppImage relaunch not working

See original GitHub issue
  • Version: 21.2.0
  • Version: 4.0.0
  • Target: Linux

In my app I have to guide the user through some steps and then restart the app to apply changes. Everything works fine on MacOS and Windows 10 but when I run the AppImage, go through the steps and restart the app, it never restarts, I have to start it manually and that ruins the UX. I’m restarting the app as follows:

ipc.answerRenderer('restart-app', () => {
  app.relaunch();
  app.exit(0);
});

I also tried to pass execFile but the path where the AppImage is executed first is a /temp folder and it does restart but with missing icons and files and it eventually crashes.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:11

github_iconTop GitHub Comments

2reactions
bosomtcommented, Jul 17, 2020

still broken 😃

1reaction
ragausklcommented, Sep 4, 2021

Workaround from https://github.com/electron-userland/electron-builder/issues/1727#issuecomment-769896927 :

const {app} = require('electron');
  const options = {args};
  if (process.env.APPIMAGE) {
    options.execPath = process.env.APPIMAGE;
    options.args.unshift('--appimage-extract-and-run'); // <- Important part
  }
  app.relaunch(options);
  app.exit(0);
Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't Run AppImage on Ubuntu 22.04? Here's How to Fix it
Your AppImage file is still not running? It may happen that the AppImage you have downloaded has some other issues that stop it...
Read more >
Ubuntu 22.04 Bugs | Solved: AppImages Not Working - YouTube
There's an issue that we can't launch appimages on ubuntu 22.04. even if we make the appimages executable, it fails to run them, ......
Read more >
Running AppImages
The AppImage is unmounted when the application called in the example is interrupted (e.g., by pressing Ctrl + C , closing the terminal...
Read more >
Release 1.0.0 - appimage-builder
For the purpose we will use an Ubuntu 18.04 system and the appimage-builder tool. The tutorial includes several troubleshooting steps that are ...
Read more >
How do I update appimages? - Ask Ubuntu
Run AppImageUpdate and select the AppImage application you wish to check for update availability from the file chooser dialog. If an update is ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found