Log off mac from terminal
How to Log Out Another User Without Logging In On Mac OS X
Also, I understand the second line of code was pasted from terminal, but therefore it escaped the double-quotes around System Events unnecessarily. Sacrilicious good point about the sleep command. Doing this is a two-step process. In terminal, run this: Use sudo kill -9 to force kill the process which I had to do to get this to work. So for example, when if the output to the first command is: This can be combined into an bash alias: Josh Hunt Josh Hunt Couldn't you just use sudo killall loginwindow?
At least on I know this is an old question but it helped me, the command I needed on OS X Duijf 4 Scott you're right, I've been too quick posting that comment. So I coded an AppleScript through Automator to: Your terminal application is just another child of your windowing session, which is itself a child of a graphical login session.
For a little child to kill his grandfather by his own hand would be far too much cruelty for such a feeble mind, so logout won't be tampering anywhere up your tasks' heritage chain. If you now, on the other hand, had come to the windowing environment through startx, returned to the virtual console, pressed ctrl-z, set the windowing session bg and then typed logout But what the heck So basically, trying to do a complete logout via keyboard by aliasing the builtin logout command is, as interesting as it might be on first thought, on second thought trying to do it the unix way without getting to know, and understand, that is, the unix way on the first hand; on a unix operating system which does it's best to hide away it's unix heritage.
Sorry for the rumpling.
Just some thought from a traveler of platforms. And this is the reason why typing 'logout' in a Terminal window will close that window, while 'exit' merely quits the shell and leaves the window open. If you start a sub-shell by typing 'bash' in a Terminal window, then that sub-shell is a non-login shell and so 'logout' gives you an error message. In contrast, a new xterm window starts a non-login shell. PeteVerdon on Mar 12, '05 I always use exit to close a terminal window, because I didn't log in to it and so that's what feels natural after years of Unix.
Lost your password? Powered by the Parse.
How to Log Out Another User Without Logging In On Mac OS X
More Mac Sites: Macworld MacUser iPhone Central. When I'm primarily using the keyboard, I find it a bit annoying to have to switch to the mouse for anything even if just to logout. Normally, if you type logout in your Terminal window, your shell quits, but of course, you're still logged in to OS X. Add the following shell function to your.
- top rated mac cleaning software;
- A log of the things I learn. I like comments!;
- Solved.tips;
- mac ethernet self assigned ip.
Depending on the state of your windows, you'll probably have to dismiss some dialog boxes in order to complete the logout, but this can be done using the keyboard as well. I'm not sure I'd replace the built-in logout function, as I've become quite used to using it to just logout from the Terminal. Instead, you might want to change the command's name to logout2 , or something else, in order to prevent an accidental total logout.
The following comments are owned by whoever posted them. This site is not responsible for what they say. IanWalker on Feb 21, '05 DavidRavenMoon on Feb 21, '05 From the Terminal Authored by: Sign in. Browse Search. Ask a question. User profile for user: Mac OS X Speciality level out of ten: I would like to log users out that forgot to log out. I'm getting tired of having to restart to shut down the users account. Will the commands be the same for an Administrators account?
Apple Footer
More Less. Helpful answers Drop Down menu. Mulder Mulder. If it doesn't, you can use: