Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Disable display dimming via the command line' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Disable display dimming via the command line
Authored by: ken22 on Feb 21, '07 11:09:35AM

If you set the halfdim in Terminal it will not survive a restart. A tip I picked up on the web solved the problem. Create an Applescript, save it as an application and make it a login item. Works great.
The script is do shell script "sudo pmset halfdim 0"



[ Reply to This | # ]
Disable display dimming via the command line
Authored by: RobertBen on Feb 22, '07 04:17:08AM

Can anybody explain to a script newbie what should be in this script exactly?

When I just paste 'sudo pmset halfdim 0' in a new document in Script Editor and try to save it as an Application I get the following:

"Syntax Error
A identifier can't go after this identifier."
(the typo is Apple's, not mine ;-)

So do I need to ad something to make this a functioning shell script?



[ Reply to This | # ]
Disable display dimming via the command line
Authored by: MacChelsea on Feb 22, '07 10:20:39AM
I've just created an AppleScript app as mentioned but with a twist to include the password. The line of Applescript is this:
do shell script "pmset halfdim 0" password "yourpassword" with administrator privileges
Replace yourpassword with your password, and of course your account needs to have administrator privileges.

---
MacChelsea

[ Reply to This | # ]

Disable display dimming via the command line
Authored by: RobertBen on Feb 23, '07 10:12:23AM

Thanks, that made the script executable, so one step further...

But now I get the message: 'pmset' must be run as root...

So do I have to enable root just to get this working?



[ Reply to This | # ]
Disable display dimming via the command line
Authored by: MacChelsea on Feb 23, '07 07:22:57PM

No, you don't. "sudo" in the original script or "with administrator privileges" in mine will make your commands act as if they're issued by "root".

---
MacChelsea



[ Reply to This | # ]
Disable display dimming via the command line
Authored by: RobertBen on Feb 25, '07 12:40:52AM

Thanks MacChelsea, that did the trick.

I didnt' get that I had to literally copy all you wrote incuding the 'with administrator privileges' (at first I understood that this was just a comment from your side, not a part of the script).

Now that I added the 'with administrator privileges' at the end of the script all is fine, thanks for all of your patience with this scripting newbie!



[ Reply to This | # ]
Disable display dimming via the command line
Authored by: tojo1 on Feb 23, '07 01:17:15AM

I have used the half dim setting in the terminal contained in the OP for many months and it has survived:
logout/login
restart
shutdown/restart.

Maybe I am just lucky [about time!].

HTH
TiPB 867 10.4.7



[ Reply to This | # ]