I'm creating a simple device with a Raspberry Pi and a touchscreen display connected to it.

On boot, I want to show a loading image (a simple gif or jpg) while X is starting. Then a chromium-browser instance will be started in kiosk mode showing my web-app.

What I have done

  1. I created a simple script which shows the splashscreen using fbi (as suggested in this answer):

    #! /bin/sh
    # Provides:         splashscreen.sh
    # Required-Start:
    # Required-Stop:
    # Should-Start: 
    # Default-Start:     S
    # Default-Stop: 5
    # Short-Description: Show custom splashscreen
    # Description:       Show custom splashscreen
    do_start () {
        fbi -T 1 -noverbose -a /home/splash.jpg
        exit 0
    case "$1" in
        echo "Error: argument '$1' not supported" >&2
        exit 3
        # No-op
        exit 0
        echo "Usage: asplashscreen [start|stop]" >&2
        exit 3
  2. I added a simple script which starts X and chromium:

    # Provides:          myapp.sh
    # Required-Start:
    # Required-Stop:
    # Should-Start:
    # Should-Stop:
    # Default-Start:     5
    # Default-Stop:
    # Short-Description: Avvia l'applicazione
    # Description:       Avvia l'applicazione
    if [ $1 == "start" ] 
        echo "Starting X server - $(date)"
        sudo X -nocursor >/dev/null 2>&1 &
        echo "Waiting X server start - $(date)"
        while [ ! -x /tmp/.X11-unix/X0 ]; do
            sleep 0.001
        echo "Starting chromium-browser - $(date)"
        sudo DISPLAY=:0 chromium-browser --noerrdialogs --disable-pinch --kiosk --start-full-screen --incognito http://localhost >/dev/null 2>&1 &
        exit 0

Everything works fine, except that the splash screen disappears as soon as the sudo X -nocursor >/dev/null 2>&1 & command is run, which makes the screen black until X ends loading (and chromium appears).

I also created a simple python script which starts again fbi, but it is hidden almost immediately.

So, how can I show the loading image while X loads in the "background"?

Any advice is accepted. My goal is to give the best experience to the user (in fact, I've hidden all of the console messages).

Consider that I'm using jessie-lite on Raspberry Pi 3 Model B.

Thank you!

  • I'm attempting to do the exact same thing for the exact same reason, but havn't made any major progress. I'll have a play around with your script, and see if I can make some more headway with it, but I'd be interested in hearing about any further progress you make as well :) Commented Nov 15, 2017 at 23:01
  • This question may give some insight - It bascially echos (and expands on) one of my suspicions; That part of the problem is the Pi's processing power and speed. Commented Nov 16, 2017 at 18:49

2 Answers 2


There is no way to do like you ask the reason is also the tty login (I think you have it enable) To perform a clean boot to X without make the splashscreen disappear you can follow these steps:

  1. Add quiet in kernel parameter (cmdline.txt)
  2. Install plymouth to manage the splash image while kernel booting
  3. Configure autologin (and startx during the autologin)
  4. Set the X background to the same used in splash image (so if you have to start Chrome for example, you dont see the X black background while loading it)
  • Thank you for some useful info in this answer. I'd like to point out, however, that "There is no way to do [this]" is... over-stating it. We're talking about Free Software here... there's a way, it's just a question of where the trade-off is between effort required to implement it, on the one hand, and what level of interruption in the splash screen is tolerable, on the other -- and finding a solution that fits the happy-medium (as determined by the asker -- likely to be different for different folks) between those competing demands.
    – lindes
    Commented Feb 24, 2021 at 3:43

See if adding xsetroot -solid "#ffffff" to .xinitrc (or whatever Xorg startup script you've configured) has an effect (it should change the background color to white). If that works, you may be able to display your splashscreen with xsetroot -bitmap.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.