TRIGGERcmd
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Lock your screen Mac

    Scheduled Pinned Locked Moved Mac
    8 Posts 4 Posters 3.9k Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Ricardo MachadoR Offline
      Ricardo Machado
      last edited by

      What is command lock screen?

      Tks

      RussR 1 Reply Last reply Reply Quote 0
      • RussR Offline
        Russ @Ricardo Machado
        last edited by Russ

        @Ricardo-Machado, please try this command:

        /System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -suspend
        

        I found that here btw.

        Russell VanderMey

        1 Reply Last reply Reply Quote 0
        • Ricardo MachadoR Offline
          Ricardo Machado
          last edited by

          @Russ said in Lock your screen Mac:

          /System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -suspend

          correct operation 😄

          1 Reply Last reply Reply Quote 1
          • Italo RodriguesI Offline
            Italo Rodrigues
            last edited by

            On my Mac this command is not working. Anyone else with the same problem? Any new solutions?

            No meu Mac esse comando não está funcionando. Alguém mais com o mesmo problema? Alguma nova solução?

            RussR 1 Reply Last reply Reply Quote 0
            • RussR Offline
              Russ @Italo Rodrigues
              last edited by

              @Italo-Rodrigues, does it work if you run that command from a Mac terminal window? Please try that and screenshot the result.

              Russell VanderMey

              1 Reply Last reply Reply Quote 0
              • Daniel GarciaD Offline
                Daniel Garcia
                last edited by

                hola,tengo el mismo problema que @Italo-Rodrigues
                lo ejecute en la terminal y no me funciono

                Captura de Pantalla 2021-05-27 a la(s) 4.54.16 p. m..png

                RussR 1 Reply Last reply Reply Quote 0
                • RussR Offline
                  Russ @Daniel Garcia
                  last edited by Russ

                  @Daniel-Garcia, I found here that Apple removed that CGSession binary in MacOS Big Sur, so please try this command instead:

                  osascript -e 'tell app "System Events" to key code 12 using {control down, command down}'
                  

                  Russell VanderMey

                  1 Reply Last reply Reply Quote 0
                  • Daniel GarciaD Offline
                    Daniel Garcia
                    last edited by

                    @Russ said in Lock your screen Mac:

                    osascript -e 'tell app "System Events" to key code 12 using {control down, command down}'

                    Gracias,ya me funciono

                    1 Reply Last reply Reply Quote 1

                    Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                    Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                    With your input, this post could be even better 💗

                    Register Login
                    • First post
                      Last post