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

Lock your screen Mac

Mac
4
8
2.3k
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.
  • R
    Ricardo Machado
    last edited by May 30, 2020, 2:28 PM

    What is command lock screen?

    Tks

    R 1 Reply Last reply May 30, 2020, 5:21 PM Reply Quote 0
    • R
      Russ @Ricardo Machado
      last edited by Russ May 30, 2020, 5:22 PM May 30, 2020, 5:21 PM

      @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
      • R
        Ricardo Machado
        last edited by May 30, 2020, 7:32 PM

        @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
        • I
          Italo Rodrigues
          last edited by May 15, 2021, 12:51 PM

          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?

          R 1 Reply Last reply May 16, 2021, 12:52 AM Reply Quote 0
          • R
            Russ @Italo Rodrigues
            last edited by May 16, 2021, 12:52 AM

            @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
            • D
              Daniel Garcia
              last edited by May 27, 2021, 11:08 PM

              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

              R 1 Reply Last reply May 27, 2021, 11:12 PM Reply Quote 0
              • R
                Russ @Daniel Garcia
                last edited by Russ May 27, 2021, 11:13 PM May 27, 2021, 11:12 PM

                @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
                • D
                  Daniel Garcia
                  last edited by May 27, 2021, 11:18 PM

                  @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