开发者

Application is launched in wrong way on os x

I start application within python using subprocess module, so this application appears in Activity Monitor utility under roots "launchd.

cmd = "/usr/bin/sudo -H -u "+ self.getCurrentUserName() + "-P" + +os.path.join(dir, app) + app_args
p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)

When application is start开发者_Python百科ed manually via Terminal it works ok and it appears under current users "launchd". Is it possible to launch applications under current users "launchd" within python?

I'm running OS X 10.6.


When you run a command as sudo, it will always show up as belonging to root, that is what sudo does...

--Dave

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜