Contribute
Register

Work around for 4x30s screen brightness...

Status
Not open for further replies.
I don't think it matters what scripts it is running from where. That is the location of the files doesn't change the context in which the script is run.

All /Library/LaunchAgents are run as the logged in user.
All /Library/LaunchDaemons are run as root.

If it truly needs root access, the scripts must be separated (blinkscreen separate from nvram -d boot-args), and the nvram one needs to be run as from /Library/LaunchDaemons. In fact, that was what I proposed in the v6.1 installer thread.

You mean this? Well, I can change it this way, but maybe this file should be part of any of the kext packages (the common kexts package) and be installed by default no matter what bootloader is installed, what do you think?
 
That's why I've implemented it in the Installer like this:

/Library/LaunchAgents/org.rehabman.blinkscreen.plist, which triggers
/usr/bin/blinkscreen.sh, which triggers
/usr/bin/blinkscreen and
nvram -d boot-args before the blinkscreen binary.

Implemented this way, it's available for all users on this computer.
Did you set special permissions on the files? other than chmod +x? For me the blinkscreen.sh is only triggered with the main user (the one created during OS X installation).

Thanks RehabMan, I will try to move the NVRAM script into LaunchDaemons.
 
You mean this? Well, I can change it this way,
Yes, that's the post...

but maybe this file should be part of any of the kext packages (the common kexts package) and be installed by default no matter what bootloader is installed, what do you think?

I was thinking we should keep it as a separate option, just so people are aware they are installing an option that will blink their screen. Having it automatically chosen might not be a good idea for everyone.
 
Updated post #1 with updated binary for all SL, Lion, and ML.
 
That's why I've implemented it in the Installer like this:

/Library/LaunchAgents/org.rehabman.blinkscreen.plist, which triggers
/usr/bin/blinkscreen.sh, which triggers
/usr/bin/blinkscreen and
nvram -d boot-args before the blinkscreen binary.

Implemented this way, it's available for all users on this computer.

These permissions must be set on all files:

chmod 755 /Library/LaunchAgents/org.rehabman.blinkscreen.plist
sudo chown root:wheel /Library/LaunchAgents/org.rehabman.blinkscreen.plist

chmod 755 /usr/bin/blinkscreen
sudo chown root:wheel /usr/bin/blinkscreen

chmod 755 /usr/bin/blinkscreen.sh
sudo chown root:wheel /usr/bin/blinkscreen.sh

Otherwise blinkscreen won't work for all users. Setting permissions is not
necessary for PIB users.
 
These permissions must be set on all files:

chmod 755 /Library/LaunchAgents/org.rehabman.blinkscreen.plist
sudo chown root:wheel /Library/LaunchAgents/org.rehabman.blinkscreen.plist

chmod 755 /usr/bin/blinkscreen
sudo chown root:wheel /usr/bin/blinkscreen

chmod 755 /usr/bin/blinkscreen.sh
sudo chown root:wheel /usr/bin/blinkscreen.sh

Otherwise blinkscreen won't work for all users. Setting permissions is not
necessary for PIB users.

The plist is just 644 (no execute bits). For the rest, correct at 755.

I find that when using 'sudo cp' the correct owner will be set (root:wheel).
And if you set permissions prior to 'sudo cp' the permissions are set correctly at the destination.
 
Guys, there's no need for the files in /Library/LaunchDaemons or /Library/LaunchAgents to be executable in order to be executed. 644 are more than enough permissions for them. However, the binaries they use should be executable.
 
rehabman... how do i remove this patch and revert back to before i installed using the pro book installer beta8. i dont like the way the screen blinks when i boot the computer and i want to remove the patch
 
rehabman... how do i remove this patch and revert back to before i installed using the pro book installer beta8. i dont like the way the screen blinks when i boot the computer and i want to remove the patch

Not really a patch. It is a launch daemon (a program which is run at login).

Code:
# in Terminal
sudo rm /Library/LaunchAgents/org.rehabman.blinkscreen.plist
 
Status
Not open for further replies.
Back
Top