Open GoogleCodeExporter opened 9 years ago
I'll have to check but I'm fairly certain that this would require running in a
WindowServer
context - how are you running crankd? I think if it's set up as a launch agent
and the
session type is "aqua" you should be able to do this. Otherwise we might need
something tricky.
Original comment by adamsc@gmail.com
on 10 Dec 2009 at 9:55
I had been running it as an agent but I don't think I had the session type set
at
all. I set the session type to Aqua and reloaded the plist, everything worked
great.
You can close this issue. It would probably be a good idea to make a note of this
in the README or add -S Aqua to the install script's launchctl load.
Original comment by r0ssa...@gmail.com
on 10 Dec 2009 at 10:23
One more comment about this: I had been running the applescript as an
application,
saved as an app bundle with LSUIElement=true, so that it would pick up on the
right
context because the open command figures that out. It caused a nasty old-style
pinwheel every so often so I switched back over to osascript. Immediately, I
hit the
same context problem that was supposed to be fixed by -S Aqua. I fixed it by
calling
my script like this: "sudo /bin/launchctl bsexec $PIDOFITUNES /usr/bin/osascript
/path/to/script.scpt". I really don't like running it with sudo but that's the
only
way launchctl's bsexec will work. Maybe something tricky might have to be
done? It
might be that context switches of this nature are strictly limited to root, I've
never developed anything that low level so I don't really know.
Original comment by r0ssa...@gmail.com
on 11 Dec 2009 at 12:37
Original issue reported on code.google.com by
r0ssa...@gmail.com
on 10 Dec 2009 at 9:37