Skip to content

Commit

Permalink
Fix AutoLaunch for Linux AppImages (#126)
Browse files Browse the repository at this point in the history
per Teamwork/node-auto-launch#89,
this resolves the desktop autostart path to the executable, which
defaulted to current working path of the running process. Due to the
AppImage architecture, that default doesn't work cleanly and requires
override.
  • Loading branch information
erichs authored and rmcvey committed Mar 7, 2019
1 parent 64d318b commit 5340ced
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/AutoLauncher.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
const settings = require('electron-settings')
const AutoLaunch = require('auto-launch')
const config = require('./config.json')
const os = require('os');

class AutoLauncher {
constructor () {
const autoLaunchOpts = {
name: 'Stethoscope',
isHidden: true
}
if (os.platform() === 'linux' && process.env.APPIMAGE) {
autoLaunchOpts.path = process.env.APPIMAGE
}
this.stethoscopeAutoLauncher = new AutoLaunch(autoLaunchOpts)
}

Expand Down

0 comments on commit 5340ced

Please sign in to comment.