[SOLVED] automate terminal command, netbook brightness

All Gurus once were Newbies
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. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help

[SOLVED] automate terminal command, netbook brightness

Postby minties on Fri Jun 08, 2012 8:34 am

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 minties on Fri Jun 08, 2012 2:29 pm, edited 1 time in total.
Mint 13 Maya 64-bit
minties
Level 3
Level 3
 
Posts: 102
Joined: Sat Apr 07, 2012 1:15 am

Linux Mint is funded by ads and donations.
 

Re: automate terminal command, netbook brightness problem

Postby esteban1uy on Fri Jun 08, 2012 10:48 am

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.
Sorry, I only speak Spanish
User avatar
esteban1uy
Level 5
Level 5
 
Posts: 734
Joined: Sat Nov 12, 2011 6:20 am

Re: automate terminal command, netbook brightness problem

Postby minties on Fri Jun 08, 2012 2:27 pm

Thanks esteban1uy! :)
Mint 13 Maya 64-bit
minties
Level 3
Level 3
 
Posts: 102
Joined: Sat Apr 07, 2012 1:15 am

Re: [SOLVED] automate terminal command, netbook brightness

Postby lego86 on Sun Aug 26, 2012 6:11 pm

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 :)
lego86
Level 1
Level 1
 
Posts: 2
Joined: Sun Sep 18, 2011 4:51 pm


Return to Newbie Questions

Who is online

Users browsing this forum: Google [Bot] and 20 guests