Automatically change a value in a specific file as root on startup

Everytime I boot openSUSE up, I need to run

kdesu kwrite /sys/class/backlight/intel_backlight/brightness

in the terminal and change the brightness value to 400 as that value is around 4600 at startup and the screen is too bright and can’t be changed with the brightness keys.

Is there a way to change that file value automatically on startup?

panchalman wrote:

>
> Everytime I boot openSUSE up, I need to run
> Code:
> --------------------
> kdesu kwrite /sys/class/backlight/intel_backlight/brightness
> --------------------
> in the terminal and change the brightness value to 400 as that value is
> around 4600 at startup and the screen is too bright and can’t be changed
> with the brightness keys.
>
> Is there a way to change that file value automatically on startup?
Test with extra Startparameter acpi_osi=Linux acpi_backlight=vendor .

Heinz

Instead, you could try this. Edit your /etc/init.d/after.local file as root:

Alt-F2: kdesu kwrite /etc/init.d/after.local

And then Add and save this line:

echo "400" > /sys/class/backlight/intel_backlight/brightness

Then follow my instructions on getting the after.local file to be run as root in openSUSE 12.1 with systemd, the default, being used.

systemd and using the after.local script in openSUSE 12.1 - Blogs - openSUSE Forums

Thank You,