[prev in list] [next in list] [prev in thread] [next in thread]
List: klik-devel
Subject: [klik-devel] [klikclient commit] r1617 - in
From: codesite-noreply () google ! com
Date: 2008-07-13 19:07:27
Message-ID: 00163691fec05d10820451ec7cf0 () google ! com
[Download RAW message or body]
Author: lionel.tricon
Date: Sun Jul 13 12:07:00 2008
New Revision: 1617
Modified:
trunk/client/trunk/klikclient/lib/klik/compat/kde.py
trunk/client/trunk/klikclient/lib/klik/execute.py
Log:
Attempt to close issue 258
Start kdeinit is definitely the best approach
Modified: trunk/client/trunk/klikclient/lib/klik/compat/kde.py
==============================================================================
--- trunk/client/trunk/klikclient/lib/klik/compat/kde.py (original)
+++ trunk/client/trunk/klikclient/lib/klik/compat/kde.py Sun Jul 13
12:07:00 2008
@@ -9,16 +9,16 @@
def init_enviroment(self, cmg):
if "KDE" in cmg.recipe.needs:
+
+ # used for the sandbox feature
os.environ["KDE_FORK_SLAVES"] = "1"
- # KDE - kdeinit
# if starting a kde app make sure kdeinit is running first
if self.klik.xdg.get_desktop_enviroment != "KDE":
- if Popen(["which", "start_kdeinit_wrapper"], stdout=PIPE, \
stderr=open(os.devnull, "w")).communicate()[0].strip():
- if not Popen(["pidof", "-x", "kdeinit"], stdout=PIPE, stderr=open(os.devnull, \
"w")).communicate()[0].strip():
- call(["start_kdeinit_wrapper"])
-
- if not Popen(["pidof", "-x", "kdeinit"], stdout=PIPE, stderr=open(os.devnull, \
"w")).communicate()[0].strip():
- call(["start_kdeinit"])
+ p = Popen(["pgrep", "kdeinit"], stdout=PIPE, stdin=PIPE, stderr=PIPE)
+ p.wait()
+ if p.returncode != 0:
+ call(["kdeinit"])
+ p.close()
return
Modified: trunk/client/trunk/klikclient/lib/klik/execute.py
==============================================================================
--- trunk/client/trunk/klikclient/lib/klik/execute.py (original)
+++ trunk/client/trunk/klikclient/lib/klik/execute.py Sun Jul 13
12:07:00 2008
@@ -98,6 +98,8 @@
if not self.klik.xdg.get_is_terminal() and cmg.get_recipe().require_terminal:
command = self.klik.xdg.get_terminal_command(title=command[0]) +
["bash -c \"%s ; echo -ne '\\nApplication terminated, press enter to
quit'; read\"" % " ".join(command)]
+ # To start kde wrapper (if needed)
+ KlikCompatKDE(self.klik).init_enviroment(cmg)
# Setup fake chroot
libfakechroot = os.path.abspath(os.path.join(self.klik.sys_path, os.path.pardir, \
"lib", "klik", "libkfakechroot.so")) @@ -118,7 +120,6 @@
# HACKS START HERE - we need to remove these if at all possible !!!
KlikCompatGeneric(self.klik).init_enviroment(cmg)
- KlikCompatKDE(self.klik).init_enviroment(cmg)
KlikCompatPython(self.klik).init_enviroment(cmg)
KlikCompatMono(self.klik).init_enviroment(cmg)
# HACKS END HERE - we need to remove these if at all possible !!!
_______________________________________________
klik-devel mailing list
klik-devel@kde.org
https://mail.kde.org/mailman/listinfo/klik-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic