0

I want to start my Program (Server.exe) as soon as the raspberry starts. My command now: mono Server.exe Everything is working, but I want to see the live output from the program anytime I want by logging into the Raspberry via SSH. When I log in now, I only see a blank command window obviously. My google results show I should use screen, but I don't know how. Thanks!

0

Redirect your output to a file and then look into the file if you want to see what happens

mono Server.exe > file.log

Then see what happens with

tail -f file.log

It would be sensible to make sure the file is emptied so it will not full up all of your disk space. You can use logrotate to take care of that. Put a configuration file into /etc/logrotate.d/. There are examples how to do it.

| improve this answer | |
  • This is what I am doing right now, but I also want to close the program (With ctrl+c) so my Program can shutdown correctly with the custom Application Exit function. Edit: Is there maybe another way to close my Application the same way as Windows does it when clicking the close button or pressing Ctrl+C? I often need to carefully shut my program down, not force Linux to kill the process. – mrousavy Sep 16 '16 at 14:42
  • kill -2 will send the SIGINT signal the same as Ctrl+C. Take a look here tldp.org/LDP/Bash-Beginners-Guide/html/sect_12_01.html – nobody Sep 16 '16 at 14:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.