How to lock computer at a certain time


Recommended Posts

  On 02/04/2013 at 16:59, xendrome said:

Make a batch file and call it via task scheduler command is

"rundll32.exe user32.dll, LockWorkStation"

Good luck doing that in Mac OS X.....

Here is one solution:

http://apple.stackex...t-lock-mac-os-x

I'm almost positive it can be done with Automator but I'm not at home to poke around. Lots of neat things can be done in Automator.

  On 02/04/2013 at 19:59, Brian M said:

Easiest way is to stick a reference add a cronjob which references:

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

You're doing it wrong, he wants to lock his computer.. ;)

... Let do it properly. (this is for fun btw)

Go to http://www.maplin.co.uk/miniature-short-round-type-spst-2445 and buy a SPST.

Open the Computer case, and locate the power button. Cut the ONE of the wires. Drill a hole big enough for SPST and install in place. Run the cut wire from the power button one of the pins on the SPST and solder it on. Then using the cable that comes from the motherboard, solder that to the other pin on the SPST

note: If the wire isn't long enough for where you want to install it, you can you can order some more or just cut up an Ethernet cable and use the wire from the cords in there.

Now, you can actually use the SPST to lock the PC. Turn the PC off and you'll need to set the key to unlock it to turn it back on.

What you're doing here using a lockable switch. The switch (SPST) needs to be in the On position (unlocked) to allow the PC's momentary button to pass power to the motherboard when it's pressed. Without that, you can't turn the PC on without opening it up.

Later on you use the other pins hook up a robotic arm, along with an alarm clock connected to an old cell phone that you can text to lock and unlock the PC. Using an automated reminder service you can have the PC locked and unlocked automatically and you won't even need a password :D

^ :omg:

Brian M's solution is probably the best one. I thought there was a way to schedule periodic events in Automator, but the only thing close to that is to perform an action based on a calendar event.

According to:

This AppleScript will show the Login Window (essentially "lock" the computer): http://mac.sandman.net/pages/LoginWindowsAndLockScreen

do shell script "/System/Library/CoreServices/Menu Extras/User.menu/Contents/Resources/CGSession -suspend > /dev/null"

Using cron isn't very intuitive. I'm surprised that Apple has not implemented a better way of handling scheduled events by now, because I recall having to use cron for stuff in Tiger. Fortunately, cron is well documented as it is the main task scheduler for Darwin, other BSD distros, Linux, and probably other POSIX complaint operating systems.

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • WhatsApp document scanning gets closer to launch as more beta testers get access by Paul Hill Meta looks as though it’s getting closer to releasing WhatsApp’s native document scanner on Android because more people are now reporting they have access in the beta. This will give users a privacy-friendly way to snap photos of documents and automatically convert them to PDF ready for sharing. According to WABetaInfo, the feature comes with two modes: manual and automatic. The manual capture gives users more control over the process allowing them to adjust positioning and lighting to get the best quality scan. Automatic mode on the other hand automatically detects the edge of your document on its own and snaps the image without too much user input, making it faster and easier. Once the picture is taken, WhatsApp automatically converts it to a PDF file so that it can be shared and opened easily by the recipient. The file can be sent within private chats or group conversations. The entire scanning and conversion process takes place locally on your device, using Android’s built-in API for snapping documents. The document itself is also only stored locally until you decide to send it. Just like other WhatsApp messages, these scans are secured with end-to-end encryption when you send them to recipients. The only privacy risk is the user sending the PDF to the wrong person. The new feature was first noticed for Android a few weeks ago and with the latest beta it’s rolling out to more people. Once Meta has tested it across a wide array of devices, we will likely see it land for people on the stable version of WhatsApp. In recent weeks, we have also seen that Meta is testing new chat color themes in the beta releases. That feature doesn’t seem to have filtered down to the stable version yet, so be on the lookout for that too if that’s of interest to you.
    • Silly, illinformed comment but thanks for playing anyway. I mean, are you actually comparing a default browser on well over a billion devices with Firefox?
    • Of course you haven't. Microsoft evangelical James is making *hit up.
  • Recent Achievements

    • Collaborator
      Mighty Pen went up a rank
      Collaborator
    • Week One Done
      emptyother earned a badge
      Week One Done
    • Week One Done
      DarkWun earned a badge
      Week One Done
    • Very Popular
      valkyr09 earned a badge
      Very Popular
    • Week One Done
      suprememobiles earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      564
    2. 2
      +FloatingFatMan
      184
    3. 3
      ATLien_0
      175
    4. 4
      Xenon
      111
    5. 5
      Skyfrog
      111
  • Tell a friend

    Love Neowin? Tell a friend!