summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/services
diff options
context:
space:
mode:
Diffstat (limited to 'src/leap/bitmask/services')
-rw-r--r--src/leap/bitmask/services/eip/conductor.py5
-rw-r--r--src/leap/bitmask/services/eip/linuxvpnlauncher.py21
2 files changed, 9 insertions, 17 deletions
diff --git a/src/leap/bitmask/services/eip/conductor.py b/src/leap/bitmask/services/eip/conductor.py
index cde53631..a8821160 100644
--- a/src/leap/bitmask/services/eip/conductor.py
+++ b/src/leap/bitmask/services/eip/conductor.py
@@ -258,7 +258,7 @@ class EIPConductor(object):
"""
logger.debug("TLS Error: eip_stop (failed)")
self.qtsigs.connection_died_signal.emit()
- QtDelayedCall(1000, self._eip_status.eip_failed_to_restart)
+ QtDelayedCall(1000, self._eip_status.eip_failed_to_connect)
@QtCore.Slot(int)
def _eip_finished(self, exitCode):
@@ -311,8 +311,7 @@ class EIPConductor(object):
error=True)
signal = self.qtsigs.connection_died_signal
self._eip_status.show_fw_down_button()
- msg = self._eip_status.tr("Outgoing traffic is blocked")
- self._eip_status.set_eip_message(msg)
+ self._eip_status.eip_failed_to_connect()
if exitCode == 0 and IS_MAC:
# XXX remove this warning after I fix cocoasudo.
diff --git a/src/leap/bitmask/services/eip/linuxvpnlauncher.py b/src/leap/bitmask/services/eip/linuxvpnlauncher.py
index 54845a8a..955768d1 100644
--- a/src/leap/bitmask/services/eip/linuxvpnlauncher.py
+++ b/src/leap/bitmask/services/eip/linuxvpnlauncher.py
@@ -63,28 +63,21 @@ def _is_auth_agent_running():
:return: True if it's running, False if it's not.
:rtype: boolean
"""
+ # Note that gnome-shell does not uses a separate process for the
+ # polkit-agent, it uses a polkit-agent within its own process so we can't
+ # ps-grep a polkit process, we can ps-grep gnome-shell itself.
+
# the [x] thing is to avoid grep match itself
polkit_options = [
'ps aux | grep "polkit-[g]nome-authentication-agent-1"',
'ps aux | grep "polkit-[k]de-authentication-agent-1"',
'ps aux | grep "polkit-[m]ate-authentication-agent-1"',
- 'ps aux | grep "[l]xpolkit"'
+ 'ps aux | grep "[l]xpolkit"',
+ 'ps aux | grep "[g]nome-shell"',
]
is_running = [commands.getoutput(cmd) for cmd in polkit_options]
- # gnome-shell does not uses a separate process for the polkit-agent, it
- # uses a polkit-agent within its own process so we can't ps-grep it.
- is_running = any(is_running)
- if not is_running:
- is_gnome_shell = commands.getoutput('ps aux | grep [g]nome-shell')
-
- # $DESKTOP_SESSION == 'gnome' -> gnome-shell
- # $DESKTOP_SESSION == 'gnome-fallback' -> gnome-shell fallback mode,
- # uses polkit-gnome...
- if is_gnome_shell and os.getenv("DESKTOP_SESSION") == 'gnome':
- is_running = True
-
- return is_running
+ return any(is_running)
def _try_to_launch_agent():