Re: NSWorkspace in a daemon

2009-11-30 Thread Bill Garrison
On Nov 30, 2009, at 9:17 AM, Nyxouf da ouf wrote: Hi, I have an Obj-c program who run as a daemon, using launchd, and that look for NSWorkspaceDidMountNotification. *[[[NSWorkspace sharedWorkspace] notificationCenter] addObserver:self selector:@selector(diskDidMount:)

Re: NSWorkspace in a daemon

2009-11-30 Thread Nyxem
I found something that said to use NSApplicationLoad() and it seems to work. Nyxem. On Nov 30, 2009, at 4:25 PM, Bill Garrison wrote: On Nov 30, 2009, at 9:17 AM, Nyxouf da ouf wrote: Hi, I have an Obj-c program who run as a daemon, using launchd, and that look for

Re: NSWorkspace in a daemon

2009-11-30 Thread Dave DeLong
While it may solve your problem, that's probably not a good idea. NSApplicationLoad() loads the AppKit framework and its dependencies (like Input Managers), which (when running as root) introduce a mess of security vulnerabilities into your program (attackers can use your app to gain root

Re: NSWorkspace in a daemon

2009-11-30 Thread Jean-Daniel Dupas
Le 30 nov. 2009 à 16:25, Bill Garrison a écrit : On Nov 30, 2009, at 9:17 AM, Nyxouf da ouf wrote: Hi, I have an Obj-c program who run as a daemon, using launchd, and that look for NSWorkspaceDidMountNotification. *[[[NSWorkspace sharedWorkspace] notificationCenter] addObserver:self

Re: NSWorkspace in a daemon

2009-11-30 Thread Nyxem
So what is the right way to do this ? Nyxem. On Nov 30, 2009, at 4:37 PM, Jean-Daniel Dupas wrote: Le 30 nov. 2009 à 16:25, Bill Garrison a écrit : On Nov 30, 2009, at 9:17 AM, Nyxouf da ouf wrote: Hi, I have an Obj-c program who run as a daemon, using launchd, and that look for