[SOLVED] automate terminal command, netbook brightness

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
minties

[SOLVED] automate terminal command, netbook brightness

Post by minties »

Hi all. I am using Mint 13 Maya 64 bit.

I am not able to lower the brightness on my Acer Aspire One netbook via the function keys, which work in Windows.

So every time I boot into Mint, I have to open a terminal and execute: sudo setpci -s "00:02.0" F4.B=40 (40 is my preferred level of brightness, lower value to reduce brightness and vice versa)

Anyway, how can I automate this command, so that it is executed as soon as Mint loads? I can open up a terminal and press the up arrow, which displays a history of the last commands that were executed, which saves me from having to type it all out every time. But I would like it all to be automated so that I don't have to manually set the brightness in the terminal.

Is there a way of editing some startup file, or create some sort of script? Thanks in advance.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
esteban1uy

Re: automate terminal command, netbook brightness problem

Post by esteban1uy »

Open a terminal and execute the following command:

Code: Select all

sudo gedit /etc/rc.local
Just above the line that says "exit 0" add the following:

Code: Select all

sudo setpci -s "00:02.0" F4.B=40
Save and restart.
minties

Re: automate terminal command, netbook brightness problem

Post by minties »

Thanks esteban1uy! :)
lego86

Re: [SOLVED] automate terminal command, netbook brightness

Post by lego86 »

Thanks! You solved a very annoying problem!

Anyway, I'm wondering how to set brightness using the FN keys on my laptop's keyboard: unfortunately they don't work for me on mint.
What do you think I could do about it?

Thanks a lot :)
Locked

Return to “Beginner Questions”