I have x-application which monitors remote object and displays corresponding picture on the screen.
If I run startx and then from another terminal start this application it starts successfully and displays all what msut be disaplyed. Without running startx application doesn't start saying it unable to connect to display. Reasonably. X11 is not started.
How to start this application (including X11, of cause) at boot time?
Without login (Linux box doesn't have keyboard)

1 Answer 1


You can use cron to start programs/scripts at boot. Install cron and use crontab -e to edit the cron file for the current user. Add a line like the following

@reboot /path/to/program --options

Save and close. The program should run at boot even without login.

If your program/script isn't starting, make sure the cron service is enabled.

systemctl status cron

If it is disabled use the following to enable the service:

systemctl enable cron
  • Is it good to call xinit this way?
    – OlegG
    Commented Aug 19, 2020 at 11:59
  • I'm not sure what you mean by "is it good". This is a way to call a program at boot and works the same way you would call the program on the command line. cron is a widely used program to run scheduled tasks. You can use cron to run programs every X hours/days/months but it also supports running programs on boot instead of at incremental times. If you need to start applications in a specific order, you could write a simple shell script which starts them in the order needed, and simply kickoff that script at boot with cron Commented Aug 19, 2020 at 18:49

You must log in to answer this question.

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