Create totally silent boot for OctoPi

Hi there,

First post and I feel I am getting very close to solving it but....
I am adding OctoPi + Touch screen to my setup with OctoDash as touch ui. All fresh install as of today.

I have managed to suppress almost all boot message, splashes etc and added my own Prusa Splash.
But just before the Splash screen is removed and OctoDash starts to take over I still see a bit of terminal for like 1 or 2 secs and it shows the OctoPrint information that is on the terminal just before a login prompt would be displayed. I guess it's coming from OctoPrint starting up but I would love to suppress it or at least move it off the main screen :wink:

Thoughts?

Cheers,

FF

I don't know if it's possible to remove that output but could you upload a quick video it so we know what you see?

Here you go, attached. I tried to capture it with slow motion.

I think you see two things:

  • First octoprint is outputting some things to the terminal before autologin occurs.
  • Then Xorg is outputting something after autologin occurs.

Hopefully someone has ideas on how to silence it all.

Cheers,

Frank

First octoprint is outputting some things to the terminal before autologin occurs.

this looks like the output of /home/pi/scripts/welcome

Then Xorg is outputting something after autologin occurs

That's not part of a standard octopi install, rather a part of OctoDash init

1 Like

I checked but it's not from the welcome script, it's from octoprint.service starting as the output comes before a terminal login happens and that is when welcome is triggered via bashrc. I have already commented that one out there.

I solved the Xserver output which is not octodash but rather standard Xorg when xinit is called again .bashrc as part of enabling auto login. I have put a >/dev/null 2>&1

So now all I have left is how to fully silence octoprint.service systemctl ....ideas?

[Service]
StandardOutput=null
StandardError=journal

Try that and daemon-reload but didn't work either.
it's strange but I suspect it's coming from python perhaps.

I was surprised that you were so fast to rule out the welcome script. I wonder whether you can find any other piece of code that would give you that sort of message.

grep 'https is also available' ./* -R from /home/pi and/or /etc should find you all suspects.

That is definitely largely the welcome script output you see there.

Here's what I did to in .bashrc for the autologin user:

# FF> 08 Aug 2021, 22:55 SGT : stop the welcome message and have silent bash login using .hushprofile
# Skipping OctoPrint welcome script
#source /home/pi/scripts/welcome

if [ -z "$SSH_CLIENT" ] || [ -z "$SSH_TTY" ]; then
# FF> 09 Aug 2021, 17:29 SGT : hide the xinit message from terminal screen
#    xinit -- -nocursor
    xinit -- -nocursor >/dev/null 2>&1
fi

That takes care of OctoPrint welcome message (commented out) after login. This is easy to test as when one SSH's into the Pi now with same user no messages are shown. The xinit line is for getting rid of the Xorg terminal information, thought that be useful to share here.

I ran your grep command in /etc and guess what? It found a hit on rc.local which has this content init. So I have commented that stuff out and now alls is silent :slight_smile:

Thanks for your help @planetar in figuring this out!

And thanks to Gnu/Linux which hides all it's secrets in plain daylight!

@Frank_Feldmann highly recommend switching to a systemd service for OctoDash. It will get rid of the output as well as not require autologin.

I have a PR open but still need to fix packaging before it gets merged. Sadly haven't had the resources to finish it up yet.

A few minor changes are required but you can find them in the PR

That sounds interesting indeed. I will keep an eye on this, if it makes it upstream makes sense to drop my hacks and just switch to this clean method.

I found some good tips on this page also for making login prompts go away when using autologin.
https://scribles.net/silent-boot-on-raspbian-stretch-in-console-mode/