Skip to content

Commit

Permalink
UI: allow to resolve app icons from local and remote nodes
Browse files Browse the repository at this point in the history
As opensnitch will run (only) on GNU/Linux, we may assume that the same
apps will exist on different machines (installed or not).

If a same app (firefox for example) is installed on different systems,
get the icon for the app.
  • Loading branch information
gustavo-iniguez-goya committed Apr 19, 2020
1 parent 00bfd58 commit 77dddca
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions ui/opensnitch/dialogs/prompt.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,7 @@ def _configure_default_duration(self):
self._duration_combo.setCurrentIndex(7)

def _render_connection(self, con):
if self._local:
app_name, app_icon, _ = self._apps_parser.get_info_by_path(con.process_path, "terminal")
else:
app_name, app_icon = "", "terminal"
app_name, app_icon, _ = self._apps_parser.get_info_by_path(con.process_path, "terminal")

if app_name == "":
app_name = "Unknown process"
Expand All @@ -191,7 +188,7 @@ def _render_connection(self, con):
con.protocol,
con.dst_port )
else:
message = "The process <b>%s</b> running on the computer <b>%s</b> is connecting to <b>%s</b> on %s port %d" % ( \
message = "<b>Remote</b> process <b>%s</b> running on <b>%s</b> is connecting to <b>%s</b> on %s port %d" % ( \
app_name,
self._peer.split(':')[1],
con.dst_host or con.dst_ip,
Expand Down

0 comments on commit 77dddca

Please sign in to comment.