0

I want to have a python script that will automatically run on boot of my linux machine. However, it is very important that I can see the terminal output since it uses computer vision and displays certain calculations. Is it possible for it to be displayed as if I just opened a terminal and ran the script manually? Thank you!

3
  • 1
    This is more of a Linux question than a programming question, and is probably better suited for Unix & Linux SE or SuperUser. Though be sure to check their question guidelines before posting. Commented Dec 15, 2021 at 22:17
  • Perhaps this could help? stackoverflow.com/questions/24518522/… Commented Dec 15, 2021 at 22:18
  • @Brian Wanting to know how to run a program at boot is both a programming and an operating system question. It'd be on topic on Unix & Linux, but it's also on topic here. Commented Dec 15, 2021 at 23:52

1 Answer 1

1

If your linux system uses Systemd then it has that functionality build-in. Just create a new myapp.service unit (see man systemd.service) which starts the application, enable it (so it runs on boot) and the output will go to the journal. (available with journalctl -u myapp)

If it is not just about output but also being able to have input available then just have the application start within a terminal session (the screen tool would be a good candidate). The systemd unit can start the screen session on-boot, and you can just attach to that terminal at some point in the future (gaining full control and seeing all the historical output).

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.