There are ubuntu with a graphical interface. There is a script that must be run before the user is authorized, and the script only works in the console. How can you make the console start up first when the system is turned on, a script is launched in it, and then a graphical user interface is started with authorization? or at least how to do it exclusively on the console without a graphical interface? that is: system start -> script -> user authorization. Script on BASH
- oneYou can add to cron. how can the service be made to start after the system is started, it can be added in etc / profile.d to be executed again after the system startup - Senior Pomidor
- ru.stackoverflow.com/a/538081/178576 - aleksandr barakin
- the answer to the question is already on ask ubuntu)) [ askubuntu.com/questions/745933/execute-script-before-login[[1] - Elanyl
- if the script is not interactive, then the systemd simple service will do - eri
2 answers
For example:
crontab -e
@reboot / path / to / program> 2 & 1> / dev / null
or write higher exit 0 in /etc/rc.local
/etc/rc.local - preferably check to be executable
Initially, Ubuntu was implemented initialization in the style of Unix System V , this means that the system has different levels of execution here you can get acquainted with the description or here at each level the administrator can determine which services need to be run.
Starting from Ubuntu 9.10 and higher, they replaced System V with Upstart here, starting / stopping services already occurred according to the events that generated the processes.
With Ubuntu version 15.04, systemd appeared in which they divided the startup process into units - specially designed configuration files
Examples of running your script can be viewed on the wiki ubuntu for Upstart or on the habr for systemd