0

I got a pretty simple script for my Raspberry PI 5 which I intent to use primarily as a media center. In pseudocode, it does:

You got 5 seconds to press key
if no key pressed
 launch desktop environment
if key pressed
 launch media center application

Google searches only point to how to run non interactive scripts (cron, systemd services) which does not work for my example. The raspberry is configured to boot to terminal, so, there's any way to make this script to run first thing after the terminal is loaded?

7
  • 1
    Is this before or after a user is logged in? Commented Oct 5 at 10:46
  • Systemd services are usually non-interactive, they don't have to be though. Commented Oct 5 at 11:04
  • Please have a look at How to run a shell script at startup, and explain how your question is different. Commented Oct 5 at 11:16
  • 1
    Like this? How can I spawn my own program in a linux tty-session instead of the shell? Commented Oct 5 at 11:19
  • > NickSlash: After the user logs. I'm not familiarized with "what comes after what" on boot, but the basic idea would be that when the terminal shows up, instead of waiting for user input, the script is run. (Regarding the systemd thing, it's the first time I've used them, and I was just testing because all articles I've seen are to run non interactive scripts, hence why I'm asking this). Commented Oct 5 at 13:02

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.