Skip to content
Unix Server Solutions
  • Server
  • Apple
  • Database
  • Ubuntu
  • Linux

Ubuntu – Run a script at startup before login

loginstartup

I want to find out how to run a script made by me at startup before login.

Best Answer

To run a script at startup of Ubuntu, before login, you would edit /etc/rc.local and add your desired commands. Make sure that the script ends with exit 0. LSS

Related Solutions

Ubuntu – Run a startup script with lightdm

You might want to try adding pre-start or post-start scripts to

/etc/init/lightdm.conf

(see http://upstart.ubuntu.com/getting-started.html for an introduction to upstart that parses this file)

Also /etc/lightdm.conf allows to specify scripts to be loaded. You have a detailed description of all (many) the options that can be used in the configuration file lightdm.conf at /usr/share/doc/lightdm/lightdm.conf.

Ubuntu – How to execute a script before login screen

Put your script in /etc/rc.local.

Related Question
  • Ubuntu – Run a startup script with lightdm
  • Ubuntu – How to execute a script before login screen
  • Ubuntu – execute script before login
  • Ubuntu – Run script on X11 startup