LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-09-2013, 03:40 PM   #1
jejuba
LQ Newbie
 
Registered: Oct 2013
Location: Paris, France
Distribution: debian wheezy; 3.10-0.bpo.3-amd64
Posts: 7

Rep: Reputation: Disabled
need to change backlight on startup


Dear all,

I would like to change backlight on startup. I know the command is
Code:
echo -n 70 > /sys/class/backlight/acpi_video0/brightness
so I wrote that to a script, and added it to the autostart application but it doesn't work. The script doesn't work when I run it anyway. I guess the reason is that I am not root and the command needs to be run as root. So here is my question: how do i get this very simple command work? i do not use 'sudo' and would rather not.

Any help would be greatly appreciated.
 
Old 11-11-2013, 03:10 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
You could execute that command when your computer starts.

You do not mention which Linux distro you are using but a lot of them have a file called /etc/rc.local. This script file is run once, after run-level specific commands and before all other scripts have run but before the login prompt appears.

Try adding this to that file (before the exit 0):
Code:
echo -n 70 > /sys/class/backlight/acpi_video0/brightness &
 
Old 11-13-2013, 05:50 PM   #3
jejuba
LQ Newbie
 
Registered: Oct 2013
Location: Paris, France
Distribution: debian wheezy; 3.10-0.bpo.3-amd64
Posts: 7

Original Poster
Rep: Reputation: Disabled
Dear Druuna,

it works great, thank you.
 
  


Reply

Tags
root, scripts, startup



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
backlight won't change on ACER (Fedora 16 Verne) OK2BCK Linux - Laptop and Netbook 7 05-10-2012 09:21 PM
How to change X startup parameters? darthfoolish Linux - Software 10 02-07-2008 07:24 AM
wallpapers on startup that change RufSoc Debian 1 05-13-2005 03:42 PM
How do I change startup programs hanleychan Linux - Newbie 1 10-01-2003 01:31 PM
Is there away to change the startup screens? Sabastian Linux - Software 5 06-19-2003 02:25 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:28 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration