I am working on a project that uses a raspberry pi for it's computing purposes. It has a touch screen with it that user can choose the options from it. I want to install a light linux distro on this project. I have written a python program that has a GUI with QT frame work (PyQt 5). I want to setup this linux distro to start my app when it boots and prevent user from closing this app and accessing to other OS parts. How can i do this ? Thank you in advance.

  • Look up “kiosk mode”. – Gilles Nov 24 '16 at 23:31

Don't know about 'boot' mode, but generalizing to a user log's in and do not want them to get a command-line prompt there would be at least two possibilities:

in ~/.profile (or it's equivalent) finish with

exec myImportProgram

When the program exits, if it exits the login will stop aka logout, and a user would have to login again to restart the application.

or make 'myImportantProgram' the user's shell (as last entry in /etc/passwd)

For both of these cases you must also ensure that there is no "shell escape" that would permit to escape out of the UI and onto a command-line environment.

Not knowing more about your environment - and you do not want users to login - I would look to using the "systemd" (or inittab or /etc/rc.d/something) startup command to that it restarts of the programs ever exits - includig crashes.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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