

It seems to me to be a major flaw in Superduper that its scheduled run will not happen unless the user in whose account it is run is logged in.


If Retrospect ran *without* the UI when nobody was logged in, then the security hole wouldn't be there. Anyone at the console may access Retrospect in this state - even persons without user accounts on the machine! It's a bad thing. Any root application running behind the login window is a security hole. Retrospect runs as root, which isn't a bad thing in itself, until you realize it does not check to see if anyone is logged in before launching its user interface. To do so which makes it more of a security risk than any daemon? I don't know what you mean by "Technically". It's bad behavior, so I wouldn't exactly commend them for this. Technically, what Retrospect does (running behind the login window) is somewhat of a security risk. My Mac now switches to the login window and goes to sleep when I press F13.Īre you bringing up the login window before sleeping so that someone else can log in if they wake up your Mac?

Google found me a terminal command to switch to the login window, but I was coming up dry for a command to sleep the Mac. I couldn't find any built-in Automator actions for the login window switch or sleep, but I did find the action to run a Terminal command.
#Terminal mac sleep timer how to
But the only way I know how to write an app is with Automator. I'm sure many of you know how to write apps with applescript or with C or to compile shell scripts. I figured that if I could write an app to do what I wanted then I would have my keyboard shortcut. I had been looking to program a keyboard shortcut that would first switch to the login window and then sleep the Mac (I had been getting tired of using the mouse for that.) I found Xkeys that allows one to program an F key to open an app. Making a shell script is fine too, but if you _don't_ already know how to use emacs (or something similar - textedit usually won't do as it leaves too much non-text in) and don't know how to use chmod, you may still want to do the things I described above. (Now if only I could turn on my machine at work from home too!) Similar: log in via ssh, run shutdown -h now. Just lazy.Īlso, sometimes I will be at home, and will need to shutdown my desktop at work. It is easier for me to ssh into it, and put it to sleep that way than to go downstairs, put it to sleep with the mouse or the switch, and go back upstairs. Sometimes at home, I'll be on my laptop, and realize that I think one of our desktops is on. Doug Anderson's answer was exactly what I had asked for.Ĭan I ask you why you want a command-line command to sleep your Mac if you don't know how to use the command line tools that you have at your disposal? None of it is explained on the page you directed me to. Not everyone who posts to this newsgroup is a UNIX geek who automatically knows to do all of that stuff. (I haven't tried it yet, the computer's doing some stuff I need to finish, but I can bet it all works).īeing sure that you use unix end-of-line characters (linefeed or 0x0a) and not Mac end-od-line characters (return or 0x0d). Copy it into a text file called slp, save it without an extension, make it executable (chmod +x slp), run it, see what happens. Things like ffmpeg or rsync or Apache 2 come to mind.Īlso, the shell script on that page is about as simple as it gets: It doesn't have to come from Apple to be useful.
#Terminal mac sleep timer install
The binaries you download from that page are in fact command-line commands to put your computer to sleep the source code is included, incredibly well-documented, and you can compile it yourself or you can just install the executables in whatever bin place you want. Apple haven't included one that we can find. No, hello in there: you asked for a command-line command to put your computer to sleep. readers might be able to translate a shell script into a terminal command. All I can see is a shell script to either build yourself or a binary to download. No terminal command that I can see on that page.
