I need run a c# Windows Forms application (Mono app) on Ubuntu startup, then I trying use Upstart. I run this application fine manually, but when I use the Upstart script, as follow:
description "Indsys Andon"
start on runlevel [2345]
stop on runlevel [016]
setuid nobody
setgid nogroup
respawn
console log
script
/usr/bin/mono /usr/lib/IndsysAndon/IndsysAndon.exe "$@"
end script
in Indsys.exe.log the error message appears:
A Unhanled Exception : System.TypeInitializationException: An exception was throw
Parameter name: Display
...
When I use the script as How do I add my mono Program to the startup? , so, in Indsys.exe.log the error messages is:
run-detectors: unable to find an interpreter for /usr/lib/IndsysAndon/IndsysAndon.exe
I don't know rights, but i think that my need is very simple. It's really necessary to use Upstart? I also tried unsuccessfully by rc.local, inserting:
/usr/bin/mono /usr/lib/IndsysAndon/IndsysAndon.exe
Somebody help me, please. Thanks,
Friends, I solved this demand with another method. Follows: Run Mono App on startup in Ubuntu with "startup applications"
Thank you very much for attention!