Keyboard shortcut for locking the screen like with the keychain drop down menu?

Discussion in 'macOS' started by apfelbaum, Jan 29, 2015.

  1. apfelbaum macrumors member

    Joined:
    Aug 31, 2014
    Location:
    Germany
    #1
    Hello,

    I wonder if there is a way to lock the screen in OS X the same way it is done like the way over the drop down menu you can activate in the menu bar in the keychain app.

    [​IMG]

    I did do A LOT of research over the last days about how to find a solution to lock the screen the way I want it and the way with the keychain menu in the menu bar is the closest way to it so far, I just wish this could be done over a keyboard shortcut.

    I know about all the other common ways to lock the screen, but they are always just not exactly how I like it.

    For example I know about Control+Shift+Eject, but the problem here is that it is always required to have the option activated that you have to enter a password after the screensaver is activated. Since I use a long and complex password (also use filevault) this is annoying when I use a short timeout and it gets insecure when I make this longer and really leave my computer a little longer. So this way I either way have to make compromises and I am not in control to just lock the screen immediately when I just want it.

    Another way would be to use the login screen for the fast user switching and this was the most promising way to do it so far, since here with tools like "Lock Me Now" I could assign a keyboard shortcut to it. However I do sometimes remote access to this machine from another computer or my phone and I can't enter passwords on this login screen. This is probably because this specific login screen already doesn't run under my user account on the Mac anymore and the remote server doesn't have access to it.

    So I need to normal lock screen because of the remote access but I want to be in total control of it and lock the Mac only myself when I know I will be away from it longer and it then it should be locked immediately. The best way is with this keychain menu shown above since it really locks the screen also when the option under system settings to require a password after a specific time when the screensaver starts is deactivated. Now I only wish I could do that specific command the keychain app does over a keyboard shortcut. Anyone knows how the keychain app does that and how I could do that over a keyboard shortcut?
     
  2. Gav2k, Jan 29, 2015
    Last edited by a moderator: Jan 29, 2015

    Gav2k macrumors G3

    Gav2k

    Joined:
    Jul 24, 2009
    #2
    Why not set a hot corner?
     
  3. apfelbaum thread starter macrumors member

    Joined:
    Aug 31, 2014
    Location:
    Germany
    #3
    With a hot corner you can basically do the same as with the Control+Shift+Eject, which doesn't necessarily lock the screen. It can be set up to start the screen saver or turn off the screen and then only locks the screen when the time out is reached you set under security. And from here it goes back to the same problem, that a few minutes time out gets annoying over time if you have a long secure password and a longer one can get insecure.

    What I just want is to be able to lock the screen when I want it to be with a keyboard shortcut. Under Windows you can do this with Windows+L, regardless if have a screensaver timeout or not, this shortcut will always just lock your screen. Such a command seems to be missing on the Mac or I just didn't find it, locking the screen with Control+Shift+Eject is always depending on timeouts after the screensaver starts and you have to make compromises.

    This option in the keychain menu now does exactly what I want, just as I said, I wonder if what the keychain app is doing there can also be achieved with a keyboard shortcut.
     
  4. apfelbaum thread starter macrumors member

    Joined:
    Aug 31, 2014
    Location:
    Germany
    #4
    I did do a little more searching and tried to find out, if this way to lock the screen like described above can be done with a Terminal command. This doesn't seem to be the case and came across an interesting thread about this here:

    http://stackoverflow.com/questions/1976520/lock-screen-by-api-in-mac-os-x

    It seems this also isn't possible (the command in the first reply just brings you to the user switch login screen which also doesn't help), but they discuss also ways to lock the screen like the keychain app does, what is what I want.

    However this seems to be a developer forum and except for the first reply they only post code which I guess needs to be compiled and I am not a developer and never used Xcode and did write or compile code myself. But could maybe someone more familiar with this have a look at what they posted there and maybe (if it doesn't take too much time) create an executable or a script that just needs to be run/clicked once to lock the screen? After I wouldn't feel so helpless anymore and could set up a keyboard shortcut for it myself ;)
     

Share This Page