My laptop always starts up at half brightness, and I want it to start up at full brightness.
I wrote a script, “brightness”, which I installed at
#!/bin/bash gdbus call --session --dest org.gnome.SettingsDaemon.Power \ --object-path /org/gnome/SettingsDaemon/Power \ --method org.freedesktop.DBus.Properties.Set \ org.gnome.SettingsDaemon.Power.Screen Brightness "<int32 $1>"
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
[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?