WebReflection / benja

Bootable Electron Node JS Application
https://archibold.io/benja/
194 stars 32 forks source link

VFAT filesystem for /home/benja/app prevents using app.makeSingleInstance() #32

Closed rhclayto closed 7 years ago

rhclayto commented 7 years ago

Since /home/benja/app is formatted as VFAT, which cannot use symlinks, it is impossible to use BENJA with Electron's app.makeSingleInstance() method, which depends on creating symlinks in the app directory. Formatting as ext4 makes it possible to use this method. See https://github.com/electron/electron/issues/10349 .

rhclayto commented 7 years ago

Another solution: change the TMPDIR environment variable in the main electron process to somewhere outside the app directory:

process.env['TMPDIR'] = '/tmp';
WebReflection commented 7 years ago

awesome, so all you need to do is to change the package.json inside the VFAT folder to set such env variable upfront, right?

  "scripts": {
    "start": "TMPDIR=/tmp electron index.js"
  }, 
rhclayto commented 7 years ago

Works for me!

rhclayto commented 7 years ago

You might want to add this information to the documentation.