This method worked better for me on pi:
cd /home/pi cd .config mkdir autostart cd autostart
Specify the file name, if you want, as long as it has .desktop at the end:
nano screen_mono.desktop
Then write this in the file change commands to suit your needs:
[Desktop Entry] Type=Application Name=Screen_mono Exec=sudo screen mono server.exe StartupNotify=false
This is the only method I have found for working with pi. (I start the VNC server every time it starts)
source share