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

    Lock your screen Mac

    Mac
    4
    8
    2.1k
    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
      Ricardo Machado
      last edited by

      What is command lock screen?

      Tks

      RussR 1 Reply Last reply Reply Quote 0
      • RussR
        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
          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
            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
              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
                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
                  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
                    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
                    • First post
                      Last post