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!

George Welder
  • 171
  • 1
  • 1
  • 3

2 Answers2

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.

Dmitry Grigoryev
  • 28,277
  • 6
  • 54
  • 147
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.

flakeshake
  • 6,244
  • 1
  • 16
  • 35