From c3ad2f342a61f857ece25c01ccbd741f23d0ce94 Mon Sep 17 00:00:00 2001 From: Jean-Marc Martins Date: Fri, 30 Sep 2016 11:23:26 +0200 Subject: [PATCH] Fix missing env variables for KDE5 --- butterfly/utils.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/butterfly/utils.py b/butterfly/utils.py index 8d2f83f..ab4a18e 100644 --- a/butterfly/utils.py +++ b/butterfly/utils.py @@ -208,7 +208,11 @@ def get_socket_env(inode, user): continue try: with open('/proc/%s/cmdline' % pid) as c: - if c.read().split('\x00')[0].split('/')[-1] in [ + command = c.read().split('\x00') + executable = command[0].split('/')[-1] + if executable in ('sh', 'bash', 'zsh'): + executable = command[1].split('/')[-1] + if executable in [ 'gnome-session', 'gnome-session-binary', 'startkde',