evilsocket / opensnitch

OpenSnitch is a GNU/Linux interactive application firewall inspired by Little Snitch.
GNU General Public License v3.0
9.86k stars 488 forks source link

Allow starting in background when tray not available #975

Closed WojtekWidomski closed 1 year ago

WojtekWidomski commented 1 year ago

This PR adds --background command line argument that starts GUI in background even when tray not available and uses QLocalSocket and QLocalServer instead of lockfile (now it is possible to open window without starting new instance, using launcher in programs menu).

Please review this code, because I never used Qt.

This will fix issue #940.

gustavo-iniguez-goya commented 1 year ago

hey @WojtekWidomski , thank you for looking into this.

What is the purpose of the change, launch the GUI when the systray is not available?

WojtekWidomski commented 1 year ago

@gustavo-iniguez-goya I don't want tray icon, but when OpenSnitch is added to startup applications and gnome-shell-extension-appindicator is disabled, OpenSnitch window shows on every login. After this change it is possible to add opensnitch-ui --background to startup applications.

gustavo-iniguez-goya commented 1 year ago

Thank you @WojtekWidomski !

I'll rework it a little bit, but it improves what @munix9 solved with the lockfile and at the same time solved the problem of displying the GUI on demand when the systray is not available. Thank you both!