Rex M
Rex M

Reputation: 144162

Equivalent of a Windows Service on OSX with Mono

What do I need to do to have my .NET-Mono application run as a background process on OSX and start when the OS starts up? (Assuming the application is otherwise ready to go on OSX)

Related

Build an installer for .NET app that can run on Windows and OS X?

Upvotes: 8

Views: 2429

Answers (4)

anthony
anthony

Reputation: 41118

Here's a blog post on what to add to your Info.plist to have your app run in the background and not have a dock icon.

Upvotes: 1

Alex
Alex

Reputation: 13239

You want to put a plist (this is an example of running CruiseControl.NET) in /Library/LaunchDaemons and the plist has to be owned by root. Also note as you are using LaunchD the process will always be running as root.

Upvotes: 1

Rob Napier
Rob Napier

Reputation: 299535

As ShuggyCoUk notes, that article is very out of date. In 10.4, OS X made some some radical changes. The guide you want to read is System Startup Programming Topics. The short answer is "use launchd."

Upvotes: 3

ShuggyCoUk
ShuggyCoUk

Reputation: 36458

this article might be a bit out of date but might be of use for OSX.

Since your mono process can run in the unix layer (assuming you have no need for a gui) then this should make things simpler.

Upvotes: 1

Related Questions