Any Apps to quickly lock screen from the top right menu bar?

ruihere
New Contributor II

HI Guys,

any easy & simple apps to stay on the top right menu bar, so users can quickly lock their screen?

thanks!

1 ACCEPTED SOLUTION

thoule
Valued Contributor II

Open Keychain Utility. In Preferences, select Show Keychain Satus in Menu Bar. Then using the lock menu bar item, choose Lock Screen.

An alternative, I built an AppleScript which users put in their dock and I called it Lock Screen.

do shell script "open -a /System/Library/Frameworks/ScreenSaver.framework/Versions/A/Resources/ScreenSaverEngine.app"

View solution in original post

8 REPLIES 8

thoule
Valued Contributor II

Open Keychain Utility. In Preferences, select Show Keychain Satus in Menu Bar. Then using the lock menu bar item, choose Lock Screen.

An alternative, I built an AppleScript which users put in their dock and I called it Lock Screen.

do shell script "open -a /System/Library/Frameworks/ScreenSaver.framework/Versions/A/Resources/ScreenSaverEngine.app"

MTFIDjamf
Contributor II

Here, we set a hot corner to engage the screen saver. Basically a user drags their cursor to the bottom right corner, screen saver comes on, device now locked, etc...

ruihere
New Contributor II

thanks! I actually use this command to add lock icon in menu bar:

open /Applications/Utilities/Keychain Access.app/Contents/Resources/Keychain.menu

milesleacy
Valued Contributor

I run this via policy at login:

#!/bin/bash

PreferredMenuExtras=(
    "/Applications/Utilities/Keychain Access.app/Contents/Resources/Keychain.menu"
)

currentUser=$( ls -l /dev/console | awk '{print $3}' )
userHome=$( dscl . read /Users/$currentUser NFSHomeDirectory | awk '{print $NF}' )

MenuExtras=$( defaults read "$userHome/Library/Preferences/com.apple.systemuiserver.plist" menuExtras | awk -F'"' '{print $2}' )

for menuExtra in "${PreferredMenuExtras[@]}"; do
    menuShortName=$( echo "${menuExtra}" | awk -F'/' '{print $NF}' )
    if [[ $( echo "${MenuExtras}" | grep "${menuExtra}" ) ]]; then
        echo "Menu Extra "${menuShortName}" present"
    else
        echo "Menu Extra "${menuShortName}" not in plist. Opening..."
        open "${menuExtra}"
    fi
done

dmw3
Contributor III

We use a key combination as a service to lock the screen, pushed out via policy.

cindySingh
New Contributor III

thats nice @dmw3 ! But what key combination did you come up with. When i think of that, most of the combinations are already in use. Using 4 key combination is becoming too mch :S

dmw3
Contributor III

@cindySingh The keys we use are - Control/Option/Command/Up Arrow - these are not aligned to anything that we have come across. Easy to remember and same position on all Apple keyboards.

bentoms
Release Candidate Programs Tester

I'be used the built in screen sleep key combo, coupled with "require password to wake from sleep"