The script works great from the command line. I can type “brightness 100” to set the display to full brightness, or “brightness 50” to set the display to half brightness.
Now I just need this script to run on startup. I used gnome-session-properties to create a brightness.desktop file in ~/.config/autostart:
[Desktop Entry]
Type=Application
Exec=/usr/local/bin/brightness 100
Hidden=false
NoDisplay=false
X-GNOME-Autostart-enabled=true
Name[en]=Brightness
Name=Brightness
Comment[en]=Sets screen brightness to 100
Comment=Sets screen brightness to 100
However, the brightness stays at half brightness after I log into Gnome. As far as I can tell, the script isn’t running.
Any idea what I am doing wrong, or how I can diagnose this?
The error means that the service isn’t currently running (read: your autostart script is started before gst-power), and it cannot be autostarted by the D-Bus daemon.
Yeah, I figured it was something like that. It’s too bad there’s not a way to wait until the service is running, but the “sleep 2” seems to do the trick. (At the risk of being completely arbitrary and depending on timing.)