开发者

Application is launched in wrong way on os x

开发者 https://www.devze.com 2023-02-09 20:24 出处:网络
I start application within python using subprocess module, so this application appears in Activity Monitor utility under roots \"launchd.

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

精彩评论

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