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

    • LibreWolf 140.0.2-1 by Razvan Serea LibreWolf is an independent “fork” of Firefox, with the primary goals of privacy security and user freedom. It is the community run successor to LibreFox. LibreWolf is designed to increase protection against tracking and fingerprinting techniques, while also including a few security improvements. This is achieved through our privacy and security oriented settings and patches. LibreWolf also aims to remove all the telemetry, data collection and annoyances, as well as disabling anti-freedom features like DRM. LibreWolf features: Latest Firefox — LibreWolf is compiled directly from the latest build of Firefox Stable. You will have the the latest features, and security updates. Independent Build — LibreWolf uses a build independent of Firefox and has its own settings, profile folder and installation path. As a result, it can be installed alongside Firefox or any other browser. No phoning home — Embedded server links and other calling home functions are removed. In other words, minimal background connections by default. User settings updates Extensions firewall: limit internet access for extensions. Multi-platform (Windows/Linux/Mac/and soon Android) Community-Driven Dark theme (classic and advanced) LibreWolf privacy features: Delete cookies and website data on close. Include only privacy respecting search engines like DuckDuckGo and Searx. Include uBlockOrigin with custom default filter lists, and Tracking Protection in strict mode, to block trackers and ads. Strip tracking elements from URLs, both natively and through uBO. Enable dFPI, also known as Total Cookie Protection. Enable RFP which is part of the Tor Uplift project. RFP is considered the best in class anti-fingerprinting solution, and its goal is to make users look the same and cover as many metrics as possible, in an effort to block fingerprinting techniques. Always display user language as en-US to websites, in order to protect the language used in the browser and in the OS. Disable WebGL, as it is a strong fingerprinting vector. Prevent access to the location services of the OS, and use Mozilla's location API instead of Google's API. Limit ICE candidates generation to a single interface when sharing video or audio during a videoconference. Force DNS and WebRTC inside the proxy, when one is being used. Trim cross-origin referrers, so that they don't include the full URI. Disable link prefetching and speculative connections. Disable disk cache and clear temporary files on close. Disable form autofill. Disable search and form history...and more. Notes: To receive automatic updates, you may refer to the unofficial LibreWolf-WinUpdater that employs a scheduled task to accomplish the same. Download: LibreWolf 64-bit | Portable 64-bit |~100.0 MB (Open Source) Download: LibreWolf 32-bit | Portable 32-bit | Other Operating Systems Links: LibreWolf Home Page | Addons | Screenshot | Reddit Get alerted to all of our Software updates on Twitter at @NeowinSoftware
    • At least it doesn't reset your defaults lol. Back to Bing, MSN and Copilot lol. Wait, that's a feature, not a bug?
    • Exactly what I was going to say, lmao. Pro-grade where? I have the S24 Ultra and there are only marginal differences between that series and the S25 series. Hell, even the S23 and S22 series is similar. Samsung stopped trying years ago.
    • Are you asking us or telling us my friend?
    • Performance and bloating is my main concern.
  • Recent Achievements

    • Week One Done
      Hartej earned a badge
      Week One Done
    • One Year In
      TsunadeMama earned a badge
      One Year In
    • Week One Done
      shaheen earned a badge
      Week One Done
    • Dedicated
      Cole Multipass earned a badge
      Dedicated
    • Week One Done
      Alexander 001 earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      562
    2. 2
      +FloatingFatMan
      182
    3. 3
      ATLien_0
      170
    4. 4
      Skyfrog
      108
    5. 5
      Som
      106
  • Tell a friend

    Love Neowin? Tell a friend!