summaryrefslogtreecommitdiff
path: root/src/leap
diff options
context:
space:
mode:
authorTomás Touceda <chiiph@leap.se>2014-06-05 15:44:53 -0300
committerTomás Touceda <chiiph@leap.se>2014-06-05 15:44:53 -0300
commit3cd3d82f46048d23b6f0436d84b346071dc373e2 (patch)
tree6118562613c2b16af1d2bce6928fec0cb05d167b /src/leap
parentb6b906cbfa82210d52805b4cf39bbc21b31b4a24 (diff)
parent6e19fd7c55ae1c4520536cb272b1ffcb6e8abd4c (diff)
Merge remote-tracking branch 'refs/remotes/ivan/bug/support-gnome-shell-polkit' into develop
Diffstat (limited to 'src/leap')
-rw-r--r--src/leap/bitmask/services/eip/linuxvpnlauncher.py15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/leap/bitmask/services/eip/linuxvpnlauncher.py b/src/leap/bitmask/services/eip/linuxvpnlauncher.py
index 1f0813e0..54845a8a 100644
--- a/src/leap/bitmask/services/eip/linuxvpnlauncher.py
+++ b/src/leap/bitmask/services/eip/linuxvpnlauncher.py
@@ -71,7 +71,20 @@ def _is_auth_agent_running():
'ps aux | grep "[l]xpolkit"'
]
is_running = [commands.getoutput(cmd) for cmd in polkit_options]
- return any(is_running)
+
+ # 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
def _try_to_launch_agent():