diff --git a/src/main/tray.js b/src/main/tray.js index 08579a24..c2a8a665 100644 --- a/src/main/tray.js +++ b/src/main/tray.js @@ -44,23 +44,15 @@ function initWin32 () { } /** - * Check for libappindicator1 support before creating tray icon + * Check for libappindicator support before creating tray icon. */ function checkLinuxTraySupport (cb) { const cp = require('child_process') - // Check that we're on Ubuntu (or another debian system) and that we have - // libappindicator1. If WebTorrent was installed from the deb file, we should - // always have it. If it was installed from the zip file, we might not. - cp.exec('dpkg --get-selections libappindicator1', function (err, stdout) { + // Check that libappindicator libraries are installed in system. + cp.exec('ldconfig -p | grep libappindicator', function (err, stdout) { if (err) return cb(err) - // Unfortunately there's no cleaner way, as far as I can tell, to check - // whether a debian package is installed: - if (stdout.endsWith('\tinstall\n')) { - cb(null) - } else { - cb(new Error('debian package not installed')) - } + cb(null) }) }