Skip to content

Commit

Permalink
ui: fixed launching the UI on more environments
Browse files Browse the repository at this point in the history
Better resolve where the UI python package is.

related #59
  • Loading branch information
gustavo-iniguez-goya committed Nov 28, 2020
1 parent f9d9af9 commit c25f49d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ui/bin/opensnitch-ui
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python3
#!/usr/bin/env python3

from PyQt5 import QtWidgets, QtGui, QtCore

Expand Down Expand Up @@ -40,7 +40,7 @@ if __name__ == '__main__':
parser.add_argument("--max-clients", dest="serverWorkers", default=10, help="Max number of allowed clients (incoming connections).")

args = parser.parse_args()

os.environ["QT_AUTO_SCREEN_SCALE_FACTOR"] = "1"
if supported_qt_version(5,6,0):
try:
Expand All @@ -56,7 +56,7 @@ if __name__ == '__main__':
server = grpc.server(futures.ThreadPoolExecutor(max_workers=int(args.serverWorkers)))

add_UIServicer_to_server(service, server)

if args.socket.startswith("unix://"):
socket = args.socket[7:]
socket = os.path.abspath(socket)
Expand Down

0 comments on commit c25f49d

Please sign in to comment.