gustavo-iniguez-goya / opensnitch

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

Unable to start ui on OpenSUSE #59

Closed zaggynl closed 4 years ago

zaggynl commented 4 years ago

On opensnitch-ui I get:

Traceback (most recent call last):
  File "/usr/bin/opensnitch-ui", line 18, in <module>
    from opensnitch.service import UIService
ModuleNotFoundError: No module named 'opensnitch'

installed by: sudo zypper in -f opensnitch-1.0.1-1.x86_64.rpm (ignored missing signature) sudo alien python3-opensnitch-ui_1.0.1-1_all.deb --to-rpm --scripts sudo zypper install python3-opensnitch-ui-1.0.1-2.noarch.rpm sudo pip install grpcio (first Import error)

Service appears to be running if I check with ps: 24806 ? Ssl 0:05 /usr/bin/opensnitchd -log-file /var/log/opensnitchd.log -rules-path /etc/opensnitchd/rules -ui-socket unix:///tmp/osui.sock

gustavo-iniguez-goya commented 4 years ago

hey @zaggynl , thank you for reporting this problem.

I'll try to reproduce it. Most probably is that some dependencies are missing. Did the package ask you to install additional dependencies? Did it output any error or warning after installing?

gustavo-iniguez-goya commented 4 years ago

Ok, for some reason the python3 system path is missing, for now you can modify /usr/bin/opensnitch-ui and add this after import grpc:

import grpc
sys.path.append('/usr/lib/python3/dist-packages/')`

You'll also need to install:

zypper python3-pyinotify
pip3 install protobuf
pip3 install unicode_slugify
zaggynl commented 4 years ago

Thank you, that worked for me as well!

Edit: minus the ` at the end of sys.path.append('/usr/lib/python3/dist-packages/') of course