gustavo-iniguez-goya / opensnitch

OpenSnitch is a GNU/Linux application firewall
GNU General Public License v3.0
394 stars 20 forks source link

Opensnitch opensnitch-ui doesn't start #72

Closed ghost closed 3 years ago

ghost commented 3 years ago

Hello All,

I'm trying to use opensnitch for the first time, so I have installed it according to the documentation: $ sudo dpkg -i python3-opensnitch-ui*.deb; sudo apt -f install Package: python3-opensnitch-ui_1.0.1-1_all.deb

I tried to start it without success.

When opening it from the launcher, it does not show or do anything.

When I run the command opensnitch-ui I get the following error

Attribute Qt::AA_EnableHighDpiScaling must be set before QCoreApplication is created. Traceback (most recent call last): File "/usr/local/bin/opensnitch-ui", line 40, in <module> service = UIService(app, on_exit, args.config) TypeError: __init__() takes 3 positional arguments but 4 were given

I am running Debian GNU/Linux bullseye/sid x86_64 with cinnamon

themighty1 commented 3 years ago

Hi, thanks for reporting this. Could you check what Qt version is installed in your system by running in terminal python3 and then copy-paste this line from PyQt5 import QtCore; QtCore.QT_VERSION_STR

ghost commented 3 years ago

Hi, thanks for reporting this. Could you check what Qt version is installed in your system by running in terminal python3 and then copy-paste this line from PyQt5 import QtCore; QtCore.QT_VERSION_STR

I did as you said, the version is '5.14.2', please let me know if any more information is needed - I'm not really sure what to have put in the issue thing.

themighty1 commented 3 years ago

You seem to be running an older version of opensnitch-ui in my /usr/local/bin/opensnitch-ui line 50 is service = UIService(app, on_exit) but in your error log it says line 40 service = UIService(app, on_exit, args.config) So, definitely yours an older version. Try to uninstall opensnitch-ui and make a fresh install.

Let us know how it went.

ghost commented 3 years ago

Admittedly I did install the older one from evilsocket first (as that was the top result on google :( ) However I since then (before submitting this issue) have attempted to uninstall it and do a fresh install of this repo. I have uninstall go and golang, removed the go folders and the git repo I pulled from evlisocket, the python libraries and anything I could find on google to uninstall it.

I shall try again now, noting my steps: note (over-use / mis-use of sudo and pip/pip3 is to my noobness of linux, I noted when I got errors or did not work below and pip should be the same as pip3) sudo systemctl stop opensnitchd sudo systemctl disable opensnitchd sudo rm -rf /etc/opensnitchd/ sudo rm /usr/local/bin/opensnitchd sudo rm /etc/systemd/system/opensnitchd.service

attempted the following however, apparently not installed: pip3 uninstall opensnitch-ui sudo pip3 uninstall opensnitch-ui pip uninstall opensnitch-ui sudo pip uninstall opensnitch-ui pip3 uninstall opensnitch sudo pip3 uninstall opensnitch pip uninstall opensnitch sudo pip uninstall opensnitch

rm -rf ~/.opensnitch/ sudo rm -rf ~/.opensnitch/

attempted but apparently not installed: sudo apt remove opensnitch sudo apt remove opensnitch-ui

rm ~/Downloads/python3-opensnitch-ui_1.0.1-1_all.deb rm ~/Downloads/opensnitch_1.0.1-1_amd64.deb

sudo apt remove opensnitch python3-opensnitch-ui

sudo pip3 uninstall unicode_slugify grcpio-tools protobuf pip3 uninstall unicode_slugify grcpio-tools protobuf

sudo pip3 uninstall grpcio-tools unicode_slugify pyinotify

Re-installation Went to https://github.com/gustavo-iniguez-goya/opensnitch/releases and downloaded python3-opensnitch-ui_1.0.1-1_all.deb sudo apt install python3-grpcio python3-protobuf python3-slugify (apparently already installed) sudo apt autoremove (removes python3-pyqt5.qtsql)

sudo dpkg -i python3-opensnitch-ui*.deb; sudo apt -f install Got a prompt: OpenSnitch GUI needs to install 3 more packages: │ │ unicode_slugify, grpcio-tools and protobuf. │ │ │ │ Note: It's better to install them as regular user instead of │ │ root: │ │ pip3 install --user unicode_slugify grpcio-tools │ │ │ │ Do you want to install them now? I said yes, and it continued.

I tried to use opensnitch-ui from the terminal and same result as before Attribute Qt::AA_EnableHighDpiScaling must be set before QCoreApplication is created. Traceback (most recent call last): File "/usr/local/bin/opensnitch-ui", line 40, in <module> service = UIService(app, on_exit, args.config) TypeError: __init__() takes 3 positional arguments but 4 were given

Starting opensnitch from launcher still shows nothing

Tried sudo apt update sudo apt upgrade

but nothing was new.

themighty1 commented 3 years ago

Thanks for trying. gustavo-iniguez-goya/opensnitch installs into /usr/bin/opensnitch-ui in your error the path is /usr/local/bin/opensnitch-ui

This means that when you run "opensnitch-ui" the old version from /usr/local/bin/opensnitch-ui is run Try to run /usr/bin/opensnitch-ui

ghost commented 3 years ago

Okay, so I can just delete the one in /usr/local/bin/opensnitch-ui? I tried to run the /usr/bin/opensnitch-ui and it opened in the tray, once I clicked on it - it actually ran, so Thank You!!!! However, it states "Status not running" at the top right, I tried to start the service but it wouldn't start. sudo systemctl enable opensnitchd returns: Failed to enable unit: Unit file opensnitchd.service does not exist. sudo systemctl enable opensnitch Failed to enable unit: Unit file /etc/systemd/system/opensnitch.service is masked. So I unmasked it sudo systemctl unmask opensnitch

But then says it doesn't exist.

themighty1 commented 3 years ago

Congrats on the progress, make sure you've installed both the server part opensnitch_1.0.1-1_amd64.deb and the GUI part python3-opensnitch-ui_1.0.1-1_all.deb (this one you've already installed)

themighty1 commented 3 years ago

Yes, you can delete /usr/local/bin/opensnitch-ui

ghost commented 3 years ago

Ah okay.. I didn't know there were two parts, I must have missed that in the documentation somewhere. Ah perfect, after installing the server and removing the /usr/local one, it now works like a dream! I much appreciate the help, thank you!

I shall now close the issue.