0

I am writing a command-line application using NCurses and I have a Raspberry Pi with a Kano "Make Your Own Tablet" kit which is essentially a touchscreen with some accessories attached. I would really love to be able to start up this Raspi in headless (or "command-line only") mode and have it boot up and instantly spin up this NCurses-based application on that one screen that is attached.

I think this is effectively "Kiosk Mode", and there are a lot of "Kiosk Mode" questions on here. However, when I looked for how to do this, I found that all of them are for GUI applications, I am specifically trying to do this with a CLI application and I am wondering if anyone knows how to do that. For all intents and purposes, this problem can be boiled down to "How to run htop on an attached screen on boot". I would still want to be able to log in with SSH without running the CLI application.

Thank you in advance!

2
  • 1
    You could auto-login (raspi-config -> System Options -> Boot/Auto Login - and add the command you want to run at the bottom of ~/.profile to run conditionally, one way to do that is check [[ "$TERM" = "linux" ]] ... I think that's what TERM is on console (it's usually xterm or a variant of xterm when using ssh) – Jaromanda X Mar 8 at 3:43
  • It worked! It took me a little while to have the time to test this, but it worked exactly as you said. It now boots up and launches htop automatically. Thank you so much! – RedHack Mar 13 at 0:35

Your Answer

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

Browse other questions tagged or ask your own question.