HelloWorld
HelloWorld

Reputation: 1863

How to detect if I run in an Electron AppImage in Linux?

I am building an electron app and I need to make a decision depending on if the app is an AppImage. The image itself is mounted in a directory, so sys.argv contains nothing that helps. Any ideas?

Upvotes: 1

Views: 864

Answers (1)

Sage comme une image
Sage comme une image

Reputation: 56

If the app is an AppImage, process.env.APPIMAGE contains the path to the .AppImage file, otherwise it is undefined.

Some of the other properties of process.env can be helpful, such as APPDIR which contains the path of the temporary directory where the actual image is mounted.

Upvotes: 4

Related Questions