0

I made an application with Mono, and I want it is always running. If my application stopped, I need it to automatically start again. Does anyone have solution that would help me?

Also, how do I start an application at startup?

apaderno
  • 289

1 Answers1

1

I would go for the following approach:

Make a shell script to start the app again if it is stopped (make sure that it is marked as executable):

#!/bin/bash

while true ; do
  mono /path/to/exe
done

The loop is paused each time the mono command is run, as it will wait for it to complete, so your app shouldn't launch hundreds of times.

Then, you can make it launch at logon.

  1. Open the Startup Applications application. You can search for it in the dash.
  2. Click add, and in the Command box, add the path to the shell script.

Log out, then log back in again, and hopefully your mono application should be running.