2

Say I have written an app. I would now like the raspberry pi to start up and go straight into that app, give the user no options to do anything on the raspberry pi's OS etc. or break out of it. I don't even want the user to see the GUI of Raspbian.

So, I want it to look like the pi is solely running this one software I wrote, similar to when one starts up a Gameboy or XMBC or Retropi.

1) How this sort of functionality called? (I only found startup scripts & crontab stuff when I googled this, but this is not what I mean)

2) How would I best implement this with my pi? My App is currently a javascript app running in electron.

I hope this question is not too stupid or that I missed anything! Would be really grateful for some advice!

2
  • Are you looking for "splashscreens" ? I doubt Electron can do it , because it has much more runtime dependencies than "plymouth" which is usually preferred for this job since it doesn't need X and fast 2D graphics. Consider starting "plymouth" first and handing off to Electron in a staggered approach , just
    – flakeshake
    Jul 21, 2017 at 12:42
  • Does one of the answers help? If so, please accept it with a click on the tick on the left side on it. This will finish your question and it will not pop up again year by year.
    – Ingo
    Nov 6, 2019 at 11:16

2 Answers 2

2

Arguably the best way to prevent user from accessing Desktop GUI is not to start that GUI in the first place. I think the proper way to do this on Raspbian is to create a custom desktop session in /usr/share/xsessions/, where your app is started directly instead of LXDE, then make LightDM auto-login into that session.

A more hardcore way is to remove LXDE and LightDM altogether, auto-login to command line and start xinit via .bashrc or similar, specifying your app in /etc/X11/xinit/xinitrc.

Note that if you provide users with a physical keyboard, they will still be able to switch terminals or use magic keys.

0

Try to hide boring startup times with a "splashcreen" like plymouth. Electron can only be started quite late in the boot process since it depends on X , you can only mask the delay. Another method to consider might to display a screenshot of your app until everything is loaded and then killing plymouth , revealing Electron.

2
  • thanks. but couldn't the user still just close the app and then go and use raspbian etc.? My goal is to have the app the only thing the user ever sees and also have it be the only thing the user is ever able to interact with or edit. Jul 21, 2017 at 13:18
  • Make a script/program which checks if Electron is running and restarts it if not. It could also restart the whole Pi instead.
    – flakeshake
    Jul 24, 2017 at 8:54

Your Answer

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

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