[gnome-tweak-tool] startup: Fix check for running executables



commit 8fc9474d4dabf2c0d9dfc5a882d58380882f7efb
Author: Rui Matos <tiagomatos gmail com>
Date:   Mon Sep 22 16:52:14 2014 +0200

    startup: Fix check for running executables
    
    os.getlogin() doesn't work if there's no controlling tty. In fact we
    don't need the username here since ps -U accepts UIDs just fine.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=728231

 gtweak/tweaks/tweak_group_startup.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gtweak/tweaks/tweak_group_startup.py b/gtweak/tweaks/tweak_group_startup.py
index cc3ff5b..0dc1c2c 100644
--- a/gtweak/tweaks/tweak_group_startup.py
+++ b/gtweak/tweaks/tweak_group_startup.py
@@ -207,7 +207,7 @@ class AutostartListBoxTweakGroup(ListBoxTweakGroup):
         exes = []
         cmd = subprocess.Popen([
                     'ps','-e','-w','-w','-U',
-                    os.getlogin(),'-o','cmd'],
+                    str(os.getuid()),'-o','cmd'],
                     stdout=subprocess.PIPE)
         out = cmd.communicate()[0]
         for l in out.split('\n'):


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]