Skip to main content
replaced http://superuser.com/ with https://superuser.com/
Source Link

You can do this using UI scripting. This requires enabled support for assistive devices in Universal Access preference pane. You can launch the script from the command line using osascript, but you need to have a GUI session for this to work.

Based on my older answer herehere, I created the following script which works on my File Vault enabled Lion. Apparently, a checkbox to disable the password altogether was removed, either by Lion itself or me enabling File Vault 2. In the latter case I cannot fix the script for you, but the linked one might work.

Change the index (6) of the menu item to click in the 9th line to select which of the options to choose.


enter image description here

tell application "System Preferences"
    set current pane to pane id "com.apple.preference.security"
    tell application "System Events"
        tell process "System Preferences"
            tell first window
                tell first tab group
                    click radio button 1
                    click pop up button 1
                    click menu item 6 of menu of pop up button 1
                end tell
            end tell
        end tell
    end tell
    quit
end tell

The following is the "official" method of changing this setting in AppleScript:

tell application "System Events" to set require password to wake of security preferences to false

It has two major problems:

  • It's boolean (you cannot change the grace period)
  • It doesn't work for me (it takes the place of the checkbox I don't have)

You can do this using UI scripting. This requires enabled support for assistive devices in Universal Access preference pane. You can launch the script from the command line using osascript, but you need to have a GUI session for this to work.

Based on my older answer here, I created the following script which works on my File Vault enabled Lion. Apparently, a checkbox to disable the password altogether was removed, either by Lion itself or me enabling File Vault 2. In the latter case I cannot fix the script for you, but the linked one might work.

Change the index (6) of the menu item to click in the 9th line to select which of the options to choose.


enter image description here

tell application "System Preferences"
    set current pane to pane id "com.apple.preference.security"
    tell application "System Events"
        tell process "System Preferences"
            tell first window
                tell first tab group
                    click radio button 1
                    click pop up button 1
                    click menu item 6 of menu of pop up button 1
                end tell
            end tell
        end tell
    end tell
    quit
end tell

The following is the "official" method of changing this setting in AppleScript:

tell application "System Events" to set require password to wake of security preferences to false

It has two major problems:

  • It's boolean (you cannot change the grace period)
  • It doesn't work for me (it takes the place of the checkbox I don't have)

You can do this using UI scripting. This requires enabled support for assistive devices in Universal Access preference pane. You can launch the script from the command line using osascript, but you need to have a GUI session for this to work.

Based on my older answer here, I created the following script which works on my File Vault enabled Lion. Apparently, a checkbox to disable the password altogether was removed, either by Lion itself or me enabling File Vault 2. In the latter case I cannot fix the script for you, but the linked one might work.

Change the index (6) of the menu item to click in the 9th line to select which of the options to choose.


enter image description here

tell application "System Preferences"
    set current pane to pane id "com.apple.preference.security"
    tell application "System Events"
        tell process "System Preferences"
            tell first window
                tell first tab group
                    click radio button 1
                    click pop up button 1
                    click menu item 6 of menu of pop up button 1
                end tell
            end tell
        end tell
    end tell
    quit
end tell

The following is the "official" method of changing this setting in AppleScript:

tell application "System Events" to set require password to wake of security preferences to false

It has two major problems:

  • It's boolean (you cannot change the grace period)
  • It doesn't work for me (it takes the place of the checkbox I don't have)
fixed indentation
Source Link
slhck
  • 230.2k
  • 71
  • 621
  • 603

You can do this using UI scripting. This requires enabled support for assistive devices in Universal Access preference pane. You can launch the script from the command line using osascript, but you need to have a GUI session for this to work.

Based on my older answer here, I created the following script which works on my File Vault enabled Lion. Apparently, a checkbox to disable the password altogether was removed, either by Lion itself or me enabling File Vault 2, in. In the latter case I cannot fix the script for you, but the linked one might work.

Change the index (6) of the menu item to click in the 9th line to select which of the options to choose.


enter image description here

tell application "System Preferences"
    set current pane to pane id "com.apple.preference.security"
    tell application "System Events"
        tell process "System Preferences"
            tell first window
                tell first tab group
                    click radio button 1
                    click pop up button 1
                    click menu item 6 of menu of pop up button 1
                end tell
            end tell
        end tell
    end tell
    quit
end tell

The following is the "official" method of changing this setting in AppleScript:

tell application "System Events" to set require password to wake of security preferences to false

tell application "System Events" to set require password to wake of security preferences to false

It has two major problems:

  • It's boolean (you cannot change the grace period)
  • It doesn't work for me (it takes the place of the checkbox I don't have)

You can do this using UI scripting. This requires enabled support for assistive devices in Universal Access preference pane. You can launch the script from the command line using osascript, but you need to have a GUI session for this to work.

Based on my older answer here, I created the following script which works on my File Vault enabled Lion. Apparently, a checkbox to disable the password altogether was removed, either by Lion itself or me enabling File Vault 2, in the latter case I cannot fix the script for you, but the linked one might work.

Change the index (6) of the menu item to click in the 9th line to select which of the options to choose.


enter image description here

tell application "System Preferences"
    set current pane to pane id "com.apple.preference.security"
    tell application "System Events"
        tell process "System Preferences"
            tell first window
                tell first tab group
                    click radio button 1
                    click pop up button 1
                    click menu item 6 of menu of pop up button 1
                end tell
            end tell
        end tell
    end tell
    quit
end tell

The following is the "official" method of changing this setting in AppleScript:

tell application "System Events" to set require password to wake of security preferences to false

It has two major problems:

  • It's boolean (you cannot change the grace period)
  • It doesn't work for me (it takes the place of the checkbox I don't have)

You can do this using UI scripting. This requires enabled support for assistive devices in Universal Access preference pane. You can launch the script from the command line using osascript, but you need to have a GUI session for this to work.

Based on my older answer here, I created the following script which works on my File Vault enabled Lion. Apparently, a checkbox to disable the password altogether was removed, either by Lion itself or me enabling File Vault 2. In the latter case I cannot fix the script for you, but the linked one might work.

Change the index (6) of the menu item to click in the 9th line to select which of the options to choose.


enter image description here

tell application "System Preferences"
    set current pane to pane id "com.apple.preference.security"
    tell application "System Events"
        tell process "System Preferences"
            tell first window
                tell first tab group
                    click radio button 1
                    click pop up button 1
                    click menu item 6 of menu of pop up button 1
                end tell
            end tell
        end tell
    end tell
    quit
end tell

The following is the "official" method of changing this setting in AppleScript:

tell application "System Events" to set require password to wake of security preferences to false

It has two major problems:

  • It's boolean (you cannot change the grace period)
  • It doesn't work for me (it takes the place of the checkbox I don't have)
added 353 characters in body
Source Link
Daniel Beck
  • 110.8k
  • 16
  • 290
  • 337

You can do this using UI scripting. This requires enabled support for assistive devices in Universal Access preference pane. You can launch the script from the command line using osascript, but you need to have a GUI session for this to work.

Based on my older answer here, I created the following script which works on my File Vault enabled Lion. Apparently, a checkbox to disable the password altogether was removed, either by Lion itself or me enabling File Vault 2, in the latter case I cannot fix the script for you, but the linked one might work.

Change the index (6) of the menu item to click in the 9th line to select which of the options to choose.


enter image description here

tell application "System Preferences"
    set current pane to pane id "com.apple.preference.security"
    tell application "System Events"
        tell process "System Preferences"
            tell first window
                tell first tab group
                    click radio button 1
                    click pop up button 1
                    click menu item 6 of menu of pop up button 1
                end tell
            end tell
        end tell
    end tell
    quit
end tell

The following is the "official" method of changing this setting in AppleScript:

tell application "System Events" to set require password to wake of security preferences to false

It has two major problems:

  • It's boolean (you cannot change the grace period)
  • It doesn't work for me (it takes the place of the checkbox I don't have)

You can do this using UI scripting. This requires enabled support for assistive devices in Universal Access preference pane. You can launch the script from the command line using osascript, but you need to have a GUI session for this to work.

Based on my older answer here, I created the following script which works on my File Vault enabled Lion. Apparently, a checkbox to disable the password altogether was removed, either by Lion itself or me enabling File Vault 2, in the latter case I cannot fix the script for you, but the linked one might work.

Change the index (6) of the menu item to click in the 9th line to select which of the options to choose.


enter image description here

tell application "System Preferences"
    set current pane to pane id "com.apple.preference.security"
    tell application "System Events"
        tell process "System Preferences"
            tell first window
                tell first tab group
                    click radio button 1
                    click pop up button 1
                    click menu item 6 of menu of pop up button 1
                end tell
            end tell
        end tell
    end tell
    quit
end tell

You can do this using UI scripting. This requires enabled support for assistive devices in Universal Access preference pane. You can launch the script from the command line using osascript, but you need to have a GUI session for this to work.

Based on my older answer here, I created the following script which works on my File Vault enabled Lion. Apparently, a checkbox to disable the password altogether was removed, either by Lion itself or me enabling File Vault 2, in the latter case I cannot fix the script for you, but the linked one might work.

Change the index (6) of the menu item to click in the 9th line to select which of the options to choose.


enter image description here

tell application "System Preferences"
    set current pane to pane id "com.apple.preference.security"
    tell application "System Events"
        tell process "System Preferences"
            tell first window
                tell first tab group
                    click radio button 1
                    click pop up button 1
                    click menu item 6 of menu of pop up button 1
                end tell
            end tell
        end tell
    end tell
    quit
end tell

The following is the "official" method of changing this setting in AppleScript:

tell application "System Events" to set require password to wake of security preferences to false

It has two major problems:

  • It's boolean (you cannot change the grace period)
  • It doesn't work for me (it takes the place of the checkbox I don't have)
Source Link
Daniel Beck
  • 110.8k
  • 16
  • 290
  • 337
Loading