On 21 Sep 2009, at 10:50, Georg Seifert wrote:

Is there a way to enable and disable file sharing from code.

I only found this:
/usr/sbin/AppleFileServer
It seems to work but if I use it, the Sharing prefPane does not show the enabled state.

And is there a way to check if file sharing is running?

Are there recommended approaches to switch the other sharing services (internet, printer, Screen sharing) from code.

This isn't really the right place to ask this question, since it isn't Cocoa related; maybe darwin-dev or somewhere would be better?

Just to give some useful pointers, it *used* to be the case that a lot of this was controlled by /etc/hostconfig and SystemStarter, but now it's largely done with launchd. You might have some luck with the launchctl command, maybe something like

launchctl load -w /System/Library/LaunchDaemons/ com.apple.AppleFIleServer.plist

However, as I say, this is the wrong place to discuss this kind of thing.

Kind regards,

Alastair.

--
http://alastairs-place.net



_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to