How can I run:

xbacklight -set 0

before login screen?

  • I am not sure since I am not at home right now, so no ubuntu to test it on,but have a look here, is this what you are looking for? gksu gedit /boot/grub/menu.lst
    – Mihai
    Jul 31, 2013 at 11:46

2 Answers 2


For this you can use the file /etc/rc.local. Insert your command to this file before exit 0 and anytime you start your system the command is executed. Please ensure that he file is also executable.

  • I'm experimenting with backlight settings right now and found that since upstart runs asynchronously you can't be 100% sure that everything is initialized the moment /etc/rc.local runs. So you might need to add sleep 10, or that with a different number, to be sure that the display is ready to take the command.
    – MadMike
    Nov 7, 2013 at 6:52

From your question, it appears you want to set screen brightness on startup. With current architecture (Xorg, not Mir or Wayland) you can do it like written on: How do I set default display brightness?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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