I am porting a windows application to OS X 10.6.8. It is a new platform for me and I am facing some difficulties.
The application is a small webserver (bottle+waitress) which is starting a browser (based on chromium embedded framework) thanks to a subprocess call.
The browser is an app file and runs ok when started from gui.
I am launching it this way:
subprocess.Popen([os.getcwd()+"/cef/cefclient.app", '--url=http://127.0.0.1:8100'])
Unfortunately, this fails with OSError: permission denied.
I tried to run the script with a sudo with similar result.
I can launch the app from shell with the following command:
open -a "cef/cefclient.app" --args --url-http://127.0.0.1:8100
But
subprocess.Popen(['open', '-a', os.getcwd()+'/cef/cefclient.app', '--args', '--url-http://127.0.0.1:8100'])
fails with the following error
FSPathMakeRef(/Users/.../cefclient.app) failed with error -43.
Any idea how to fix this issue?
The file
cefclient.appis actually a directory (an application bundle, specifically), not the application executable. The real executable is located inside the bundle, with a path likeContents/MacOS/executable_name. So to launch it, you’d do this: