When I boot a Linux device, I want to run a program when the device's login screen appears (or before that. Main question is run an application without user login. For example Java JFrame Forms or python tkinter)

Is it possible for me to open an application without a user login?

I tried using crontab but didn't work. I guess, solution may be "init.d" so I tried this but I couldn't run it on my raspberry pi. I didn't quite understand how to use init.d with java or python.

Actually The device I want to do this with is the Jetson Nano. (I'm using raspberry pi because I don't have it at the moment.) I wonder if something that doesn't work on raspberry pi can work on jetson nano? Or is there a solution other than these?


1 Answer 1


Yes, it is possible to set up an application so that it runs on a user account dedicated to that purpose and is available on a local GUI display without requiring a login. This is known as a "kiosk setup" or "kiosk mode".

Google for "raspberry pi kiosk mode" and you will find a lot of examples: most of them run chromium-browser configured to a fixed full-screen mode with restricted window manager functions, but you could substitute any other GUI program in its place. (Also omit unclutter if you don't need the mouse pointer hidden away.)

Usually, setting up a GUI autologin to a single account and configuring it to run your application in a minimalist window manager is the easiest way to do it.

If you want to minimize the amount of software still further, you might study how startx works and write a custom init.d script to use either startx or even xinit to start up both the X11 server and your application together, either with no window manager at all, or with a suitably-configured minimalist window manager. This would be the harder way to do it, but you would be almost guaranteed to learn a lot about the intricacies of the X11 session set-up in the process :-/

If you want to have something displayed in the GUI login screen alongside the normal login dialog, then you should find the GUI session start-up scripts of your X Display Manager service, and customize them to start your application when preparing the display for the login dialog: for example, with gdm3, the right place for adding things to the login screen would be /etc/gdm3/Init/Default.

Note that the display manager may want to reset the X11 server when transitioning from the login screen to the logged-in session and vice versa for security reasons, so it may not be possible to start your application in the login screen and have the logged-in session "inherit" access to it: you might have to restart your application as part of the GUI login sequence.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .