2

I have a python cron script. Switch on Raspberry Pi and when the login prompt appears, soon enough the script runs.

Is it possible for the script to "output" strings to this main screen without a user logging in?

Easy to do if a user logs in and the script can send to the specific "tty".

1 Answer 1

1

Maybe you could make your script write the output into the file /etc/motd so it would just always be shown on the login screen and it would be updated by your cronjob.

3
  • That is displayed after logging in. But your idea led me to the /etc/issue file which shows message before login prompt. Now, how do you get that to refresh....?
    – zaf
    Feb 22, 2017 at 15:04
  • Oh I'm sorry, I misunderstood that. Maybe it's possible to write the output of your script into the issue file and do that like every five minutes so the file would stay updated? But I'm not really sure if it would refresh on the login prompt if the text in the file changes. Feb 23, 2017 at 7:09
  • No, it doesn't refresh. I'm thinking it's more of a security precaution that it's not possible at all.
    – zaf
    Feb 23, 2017 at 9:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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