0

I have a Pi4 running Raspbian OS with an LCD touchscreen display attached. I am not using X so no desktop is shown. The display appears as /dev/fb0 and I want to use this in a kiosk manner (with code that I am writing).

When the Pi boots, it outputs everything to the LCD display, including the console log-in prompt with a flashing cursor. My code then launches as a service and does its stuff.

I need to get rid of the flashing cursor. I know I can do this by adding "tput civis" to ~/.bashrc but doing this means that I have no cursor when I ssh into the Pi. I can get the cursor back for the ssh session by using "tput normal" but it is a pain having to do this every time.

I was thinking that I should only run the "tput civis" command if the output device is the LCD display rather than an ssh session. But how can I determine that, such that I can add a test around the tput command in ~/.bashrc? Or is there another way?

5
  • Have you considered writing a script to make the change when logging in via SSH? Commented May 6, 2022 at 17:08
  • How would I know it was via ssh rather than the boot console?
    – WhyNine
    Commented May 7, 2022 at 8:30
  • When you SSH into the pi you probably don't log in as root, do you? And so you could just add something to ~/.bashrc of the user you use for ssh.
    – PMF
    Commented May 7, 2022 at 9:11
  • This should help unix.stackexchange.com/questions/217270/… Commented May 7, 2022 at 14:35
  • @SteveRobillard, Many thanks, that's solved it
    – WhyNine
    Commented May 7, 2022 at 15:25

0

Your Answer

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

Browse other questions tagged or ask your own question.