From 4a974a1d3d0d0280d2f7765c008df3bdacf6aaf7 Mon Sep 17 00:00:00 2001 From: BlueManCZ Date: Sun, 31 Jan 2021 11:12:18 +0100 Subject: [PATCH] Look for libappindicator libraries instead of package --- src/main/tray.js | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/main/tray.js b/src/main/tray.js index 08579a24..a6a4dc06 100644 --- a/src/main/tray.js +++ b/src/main/tray.js @@ -49,18 +49,10 @@ function initWin32 () { 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('ls /usr/lib*/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) }) }