I'm trying to find out whether there is any kind of equivalent command line one-liner which replicates the exact identical functionality of the 'Lock Screen' menu option available via the Keychain app in OS X 10.6
I'm aware of the all the 'usual' solutions (sleep/screensaver preferences to require a password on reactivation) but these are not suitable to me.
I'm also aware of this option:
/System/Library/CoreServices/Menu\ Extras/user.menu/Contents/Resources/CGSession -suspend
/System/Library/CoreServices/Menu\ Extras/user.menu/Contents/Resources/CGSession -suspend
which is also not suitable for me.
The perfect functionality is the 'Lock Screen' option however I have not yet found an elegant way to call it.
At the moment, I am calling via Automator, which isn't elegant!
I have read much about this issue and my understanding is that no-one has yet found the 'holy grail' but I was wondering whether that might have changed.
Thanks.