MagicMirror² v2.13.0 is available! For more information about this release, check out this topic.

Restoring the MM boot splash



  • Hi,

    I recently updated Raspbian on my mirror and the custom boot splash screen has been replaced by the standard Raspbian one.

    Does anyone know how to put the custom MagicMirror splash screen back?

    Simon.



  • @simonbooth the installer does this

    	THEME_DIR="/usr/share/plymouth/themes"
    	echo -e "\e[90mSplashscreen: Checking themes directory.\e[0m" | tee -a $logfile
    	if [ -d $THEME_DIR ]; then
    		echo -e "\e[90mSplashscreen: Create theme directory if not exists.\e[0m" | tee -a $logfile
    		if [ ! -d $THEME_DIR/MagicMirror ]; then
    			sudo mkdir $THEME_DIR/MagicMirror
    		fi
    
    		if sudo cp ~/MagicMirror/splashscreen/splash.png $THEME_DIR/MagicMirror/splash.png && sudo cp ~/MagicMirror/splashscreen/MagicMirror.plymouth $THEME_DIR/MagicMirror/MagicMirror.plymouth && sudo cp ~/MagicMirror/splashscreen/MagicMirror.script $THEME_DIR/MagicMirror/MagicMirror.script; then
    			echo
    			if [ "$(which plymouth-set-default-theme)." != "." ]; then
    				if sudo plymouth-set-default-theme -R MagicMirror; then
    					echo -e "\e[92mSplashscreen: Changed theme to MagicMirror successfully.\e[0m" | tee -a $logfile
    

    u may only have to run the command

    sudo plymouth-set-default-theme -R MagicMirror
    


  • @sdetweil many thanks!

    I will try this tonight!


  • Module Developer

    There is a custom boot splash screen??? 😦 😵 😍



  • @lavolp3 yes




  • Module Developer

    @sdetweil is that only installed with your script? I don’t seem to have it on my mirror with the latest update.



  • @lavolp3 it is/was installed as part of the original install script raspberry.sh, I didn’t change that except to
    add some logging

    # Check if plymouth is installed (default with PIXEL desktop environment), then install custom splashscreen.
    echo -e "\e[96mCheck plymouth installation ...\e[0m" | tee -a $logfile
    if command_exists plymouth; then
    	THEME_DIR="/usr/share/plymouth/themes"
    	echo -e "\e[90mSplashscreen: Checking themes directory.\e[0m" | tee -a $logfile
    	if [ -d $THEME_DIR ]; then
    		echo -e "\e[90mSplashscreen: Create theme directory if not exists.\e[0m" | tee -a $logfile
    		if [ ! -d $THEME_DIR/MagicMirror ]; then
    			sudo mkdir $THEME_DIR/MagicMirror
    		fi
    
    		if sudo cp ~/MagicMirror/splashscreen/splash.png $THEME_DIR/MagicMirror/splash.png && sudo cp ~/MagicMirror/splashscreen/MagicMirror.plymouth $THEME_DIR/MagicMirror/MagicMirror.plymouth && sudo cp ~/MagicMirror/splashscreen/MagicMirror.script $THEME_DIR/MagicMirror/MagicMirror.script; then
    			echo
    			if [ "$(which plymouth-set-default-theme)." != "." ]; then
    				if sudo plymouth-set-default-theme -R MagicMirror; then
    					echo -e "\e[92mSplashscreen: Changed theme to MagicMirror successfully.\e[0m" | tee -a $logfile
    				else
    					echo -e "\e[91mSplashscreen: Couldn't change theme to MagicMirror!\e[0m" | tee -a $logfile
    				fi
    			fi
    		else
    			echo -e "\e[91mSplashscreen: Copying theme failed!\e[0m" | tee -a $logfile
    		fi
    	else
    		echo -e "\e[91mSplashscreen: Themes folder doesn't exist!\e[0m" | tee -a $logfile
    	fi
    else
    	echo -e "\e[93mplymouth is not installed.\e[0m" | tee -a $logfile
    fi
    

  • Module Developer

    @sdetweil Interesting, so it is currently only present on new installations. Updaters from earlier install don’t get this paticular upgrade.
    I guess I really need to take some time to look into your script and use it for future updates.
    Thanks for the explanations!



  • @lavolp3 correct. Only installed during initial install.

    I didn’t create the installer script, only updated it and made it handle more environments.
    Like the node/npm installs used to be one thing, they are separated now.
    The old code installed node. And then failed cause npm wasn’t installed.

    The pm2 install was hard coded to one is platform. I fixed that.

    It only handled one screensaver config. I fixed that.

    And added logging.

    Then I made an upgrade script

    The upgrade script does what you would do.
    Download the code, npm install. And then npm install in all the active module folders where there is a package.json file


Log in to reply