[SOLVED] Screen brightness: how can I alter protected (root) files

I have arch log me in as user automatically to X.  But as I am using a laptop, I would like to run the following commands during startup
if grep Discharging <<< "$(acpi)"; then
echo 46 > /sys/class/backlight/intel_backlight/brightness
else
echo 400 > /sys/class/backlight/intel_backlight/brightness
fi
The commands are rejected 'permission denied, even though I can use privileged commands, like blkid, as user.  Apparently it doesn't extend to altering root's files as well.
Can this be done as user?  And if not, which file could I insert these commands so that the brightness level can be set during the boot process?  I've tried /etc/bash.bashrc, but apparently that file is not run until the login has occurred.
Last edited by porphyry5 (2015-03-01 20:16:34)

mychris wrote:Have you read https://wiki.archlinux.org/index.php/Backlight? It covers several different ways to change the backlight.
I tried a variety of methods from this page about 6 months ago, the only one I could get to work automatically was the one I quoted in the first post, and then only if I logged in first as root on tty1 and included the code in /etc/bash.bashrc, and then switched to tty2 to log in as user.
I expected the xbacklight command would do the job in ~/.xinitrc, but it has no effect there, though it works fine after I'm logged into X and set to start work.
I've stayed away from writing udev rules as it looks to require a significant investment of effort to learn and I've not found an example of a conditional rule to follow the pattern of, to avoid investing that effort.
Slackware got me accustomed to simply inserting bash commands into their boot up scripts to produce the effects I wanted, arch seems to be much more restrictive.

Similar Messages

  • How can i password protect some files and web sites?

    How can I possword protect some files and web sites on my mac air so others using my laptop can't access them?

    Set a password for your user; create other user accounts for when other people want to use it. You can create a "guest" login which gets wiped after every logout, if that's more appropriate for them.
    Matt

  • Hey guys, how can i password protect my files in external hard drive? I want to access those files both from mac and windows PC!

    Hey guys, how can i password protect my files in external hard drive? I want to access those files both from mac and windows PC!

    If you want a cross-platform solution that doesn't require the use of third-party software, use an external drive with hardware encryption. The device will have either a physical key or a numeric keypad. I don't have a specific recommendation.

  • How can I password protect pdf files that intend on email

    How can I password protect a pdf file that I intend on emailing?

    Hi kimberlyb5119003,
    To password protect a PDF file, you need to use Acrobat. For instructions, see Acrobat Help | Security
    Best,
    Sara

  • How can I password protect specific files?

    I have teens using my Mac and sending inappropriate photos, etc., over the internet. I'm trying to save some of the things they've mistakenly left behind on my computer to use as proof of what they're doing. Right now all I get are denials. I don't want them to have access to what I've saved, especially since I have one boy, one girl and I don't want them to see one anothers pictures. Can I set up a file, either in documents or on my desktop that I can password protect?

    That would a question for a Mac support forum.

  • How can I password protect iPhoto files?

    I have a MacBook, and want to password protect some files in iPhoto.  I cannot figure  it out.  I've visited the local Apple Store Genius Bar, and they did not know how.  Anysuggestions?

    Here's the free method as pointed out by Terence:
    Happy Holidays

  • I have a Airport Extreme with a 1TB external HD connected to it.  How can I password protect certain files?

    I have a Airport Extreme with a 1TB external HD connected to it.  I have it set up so my Macbook Pro and PC's in the house can access it.  i have some files that i would like to protect(sensitive personal info.).  Is there a way that can be done where as certain folders are password protected?  Any advice is appreciated.  Thanks!

    Would a good workaround be to use disk utility to set up a password protected sparse image, of course being connected directly to the Mac, then connect the drive to the Airport Extreme?
    Then, couldn't one use that drive and protected files as normal on the airport? It would just require one extra step of using a Mac to set things up first.
    I disconnected my Airport so cannot check it out for myself.
    Hugh

  • My mac book pro version 10.6.8 screen brightness doesn't increase its just black but can see icons when m 2 close to the screen..how can the problem be solved

    my mac book pro version 10.6.8 screen brightness doesn't increase its just black but can see icons when m 2 close to the screen..how can the problem be solved

    Try resetting the  SMC http://support.apple.com/kb/ht3964
    You can get an idea for repair from these site. Check locally for your area.
    https://www.techrestore.com/mac/
    http://www.dttservice.com/macbookprounibody.html
    http://www.myservice.com/macbookpro.html
    http://www.ifixit.com/Device/MacBook_Pro
    http://www.PowerbookMedic.com

  • ı have ip4s, today i noticed that there is a yellow area left of screen. How can i solve this problem ?

    ı have ip4s, today i noticed that there is a yellow area left of screen. How can i solve this problem ?

    live with it.  Or you can bring it in to a 3rd party repair shop and see what they say.  However, anyone other than Apple touching that phone will void the warranty and any support on that phone forever.

  • I have an iPhone 6 with IOS 8.1.3 and when I use the landscape view in Safari, the bookmark page appears and takes up one half of the screen. How can I get rid of the bookmark page so I can have the whole screen to what I am browsing?

    I have an iPhone 6 with IOS 8.1.3. When I go to the landscape view in Safari, the bookmark page appears and takes up one half of the screen. How can I get rid of the bookmark page so I can use the whole screen to what I am browsing?

    OOPS! Too quick on the trigger to ask that question without trying anything. Sorry. Solved it by touching the bookmark icon.

  • How can I alter the display colours on ios7

    How can I alter the display colours on my iphone and iPad. The new white grey with some bright colours is driving me mad. I have vision problems and this new theme is making it very difficult to use. Turning brightness down doesn't help.

    Thanks fro y reply,
    The problem is that the nr. 3131 dosen't have a MAC/IP address, it was created in Directory Nr. not on the Device/add device, the nr was created to be able to call Avaya agents and the user to not see the personal agent nr ( 3131 ), only the name. The problem is  when a place a call the nr from forwarding appears on the display instead the name I put ( Test ).
    Thanks

  • I got hacked and someone was using my mouse how can i be protected?

    I resentrly got hacked. someone was using my mouse and was going to reload a website. i could not move my mouse but i could see my mouse moving. how can I be protected?

    well a simpler and less "evil" possibility is a wireless mouse or some other signal interfering.  Are you using a blutooth or other wireless mouse?
    If you don't have any sharing turned on, it would take a pretty advanced hacker to gain control of your mac.
    If you don't have remote login turned on, or screen sharing, or file sharing, it would be very very hard to do.  But nothing's impossible.....

  • How can I move an icon/file from one screen of my ipad to another?

    How can I move an icon/file from one screen on my ipad to another?

    Press and hold the icon until they start to wiggle. Then while holding it, drag it to the edge of the screen and wait for the page to switch, then let go of the app

  • Adobe reader xi i am running 2 display screens and when i have a file open and go to print the print page opens on my second screen.  How can I get adobe reader to just display on one screen?

    adobe reader xi i am running 2 display screens and when i have a file open and go to print the print page opens on my second screen.  How can I get adobe reader to just display on one screen?
    I want the capability of adobe reader to just run on one screen.

    I had the same problem.
    Try this.
    https://igppwiki.ucsd.edu/groups/publichelpwiki/wiki/a1538/Howto_Disable_Acrobat _as_the_Safari_PDF_Viewer.html

  • I cracked my screen. I want to use other monitor which I had one. I bought Apple Mini-DP to VGA adapter. It worked. It means I can see ADDITIONAL screen. However I want to use this monitor for the main screen. How can I do?? Please help.

    I cracked my screen. I want to use other monitor which I had one. I bought an Apple Mini-DP to VGA adapter. It worked. It means I can see ADDITIONAL screen. However I want to use this monitor for the main screen. How can I do?? Please help.

    You have the display set in Extended Desktop mode. The Menu Bar and Dock will be on the MacBook display and your background screen on the monitor. In System Preferences>Display on the MacBook screen there should be an Arrangement tab when you have the MacBook hooked up to the monitor and both screens working. When you click the Arrangement tab do you see two monitors side by side? One of them will have a Menu Bar at the top. Just click on the Menu Bar and drag it to the second monitor. That will make the second monitor your main screen. You can now use your MacBook in Clamshell Mode with a wired or Bluetooth keyboard and mouse.  http://support.apple.com/kb/HT3131 When you disconnect from the monitor your Menu Bar will automatically change back to the MacBook.

Maybe you are looking for

  • Error "attachment XI_Context not found"

    Hi, coluld you please anyone help out in solving the isuue in xml message in sxmb_moni? <Trace level="1" type="B" name="CL_MAPPING_XMS_PLSRV3-ENTER_PLSRV" /> - <!--  ************************************   -->   <Trace level="2" type="T">......attachm

  • How to modify a standard OAF page in version R12

    Dear all, I have a requirement to modify a standard OAF page(can't implement by personalization),and my EBS version is R12,but i have not the source java code of the page,I try to decomplie the class file by a sofeware named 'YingSoft' , as the r12's

  • 3g dosen't work in iphone 5

    3g data problem in ios 8.0.2 please help....

  • HANA view as source in Data Services

    Hi Gurus, I have a data flow in Data Services where an attribute view is used as source. That is data flow is running fine as of now. As per an updated requirement, we have added couple of fields to the view additionally and have to use them in our d

  • Kbssv error on RAC

    Has any one out there encountered the ksbsrv error :- 'no startup aknowledgement from forked process after 3 mins' on a windows RAC configuration using 9.2.0.5? We have had this error on one of our 4 nodes. This rendered the entire database unusable