Log Out means "stop"

Discussion in 'General Mac Discussion' started by arogge, Dec 23, 2004.

  1. arogge macrumors 65816

    arogge

    Joined:
    Feb 15, 2002
    Location:
    Tatooine
    #1
    How do I get OS X to behave normally instead of like Microsoft Windows when I tell it to log out? OS X doesn't seem to understand that if I ask it to log out, I want it to immediately close all running processes and return to the login window. What it does appears to be this:

    Send Quit command to all applications;
    Wait for normal program exit;
    If any program does not Quit, cancel logout.

    I told it to log out yesterday and came back later to find that my system was not secure because:

    [​IMG]

    The Terminal window also disables the logout function:

    "Closing this window will terminate the following processes inside it: Folding..."

    X11 displays a similar dialog box.

    When I ask for a logout, I want it now. That means issuing the Kill command to all user processes! I don't care which programs are running or what they are doing. I was trying to avoid a power cut due to a storm a few months ago, while I had Folding running in Terminal and OpenOffice.org running through X11. I saved my open document and went to log out, temporarily forgetting about this OS X problem and going to check the status of another system. Both Terminal and X11 popped up with their error messages. After running back to the Mac and clicking through the dialog boxes, it took too long to get to the login screen. It didn't happen quickly enough before the power was cut. Is there an option to get OS X to Kill instead of Quit applications when logging out?
     

    Attached Files:

  2. SilentPanda Moderator emeritus

    SilentPanda

    Joined:
    Oct 8, 2002
    Location:
    The Bamboo Forest
    #2
    Don't have an answer for you I guess but... if you just want it to kill all the processes instead of quitting them like it's supposed to do why don't you just pull the plug out of the wall?

    An OS is supposed to quit all programs when you log out. This is to allow programs to give you the option to save unsaved documents, clean themselves up, disconnect from servers and services properly... this is to reduce problems with between programs.

    The only time the computer will prompt you is if the application has unfinished business. Killing them is going to cause more problems than it's worth I'm afraid.

    Maybe you should write yourself a little script you can click on to kill all user processes and you can click that before you log out. Heck... just force quit everything.

    Good look with your computers stability.
     
  3. varmit macrumors 68000

    varmit

    Joined:
    Aug 5, 2003
    #3
    If you want to do a kill all, get and apple script to do it. Otherwise, the rest of us want this fail safe so we don't loose anything we were working on.
     
  4. arogge thread starter macrumors 65816

    arogge

    Joined:
    Feb 15, 2002
    Location:
    Tatooine
    #4
    Because cutting the power doesn't kill the processes and return to the login screen; a power cut can damage the hardware. CDE and KDE do what I want. I just had five applications running under Linux/KDE, including Folding. Within three seconds of sending the logout command, Linux sent the break signal to the terminal shell, killed all user processes, and returned to the login screen. If an application crashes or stops responding, CDE and KDE will still log out normally. A normal application should not be able to cancel a system-level command. The result of this proper operation is a system that does what is intended when necessary. The prevention against forgetting to save your data or accidentally issuing the logout command is that window on the screen asking whether you really wanted to log out.
     
  5. Sun Baked macrumors G5

    Sun Baked

    Joined:
    May 19, 2002
    #5
    OS X won't log out and kill all the applications immediately if it'll cause the user to lose data.

    Heck, even Mozilla/Firefox will prevent it from logging out it if you don't click the ok that it gives you.

    If you want to secure the system from other users while you are away -- turning on the screen saver/require password/hot corner.

    So the machine drops into the password required screen saver while any time you move the mouse to a specific corner.

    ---

    Otherwise you'll probably be stuck with a kill script in Applescript, that kill everything and logs out.

    However, as people said -- that can cause data loss.

    Pulling the plug can corrupt the HD, OS X does not like forced restarts and kernal panics -- have enough of them and fail to run disk first aid and fsck and there's a good change your machine will fail to boot one day.
     
  6. thecow macrumors 6502

    Joined:
    Nov 24, 2003
    Location:
    Timonium MD
  7. arogge thread starter macrumors 65816

    arogge

    Joined:
    Feb 15, 2002
    Location:
    Tatooine
    #7
    It was the PowerBook, and I wanted it to log out and go to Sleep. The Sleep timer didn't start and I came back to find the system sitting there with the error message on the screen. I want the OS X GUI to be like CDE and KDE. Multiple desktops and individual application menu bars would be good, too. :D
     
  8. arogge thread starter macrumors 65816

    arogge

    Joined:
    Feb 15, 2002
    Location:
    Tatooine
    #8
    That's another problem I have with OS X. I use Fast User Switching, but once a second user profile is opened, OS X disables my HP printer:

    [​IMG]

    OS X stops all the printer jobs and refuses to continue. It also happens if I use FUS while the printer is printing. The printer will sit there with part of a page printed and refuse to continue. Why would logging in as another user cause a change to the printer task?
     

    Attached Files:

  9. mkrishnan Moderator emeritus

    mkrishnan

    Joined:
    Jan 9, 2004
    Location:
    Grand Rapids, MI, USA
    #9
    Yeah, so my understanding of most Unix environments is that when a system quit is issued, the system tells all apps to quit, gives them some amount of time to make nice and do so properly, and then force quit's the apps that fail to comply, right? Whereas Windows and MacOS tell all apps to quit, and then the system hangs mid shutdown or aborts shutdown if apps non-comply. But in UNIX, not every app is automatically killed without any possibility of a proper burial.
     
  10. live4ever macrumors 6502a

    Joined:
    Aug 13, 2003
    Location:
    Thunder Bay, ON
    #10
    Does shift+command+option+Q not work for you? It has always quit all apps and logs me out.
     
  11. arogge thread starter macrumors 65816

    arogge

    Joined:
    Feb 15, 2002
    Location:
    Tatooine
    #11
    No, the applications can still cancel the logout command. Go to a command prompt and switch users, then try to log out. I get "The application Terminal cancelled logout. To try again, quit Terminal and choose Log Out from the Apple menu." CDE and KDE just work. :p
     
  12. savar macrumors 68000

    savar

    Joined:
    Jun 6, 2003
    Location:
    District of Columbia
    #12
    I don't like those hot corners, but you can also setup the Monitors control panel to put a menu item up in the top right corner, next to sound and time. That menu gives you an option to "Lock the screen", which activates the screensaver.
     
  13. mkrishnan Moderator emeritus

    mkrishnan

    Joined:
    Jan 9, 2004
    Location:
    Grand Rapids, MI, USA
    #13
    How about executing some variant of the shutdown command from the command line? I'm not 100% clear on the options but it looks like you can force the issue. And you can put it in an executable script and then icon it into your dock if you want to do it by clicking....
     
  14. arogge thread starter macrumors 65816

    arogge

    Joined:
    Feb 15, 2002
    Location:
    Tatooine
    #14
    OS X did it to me again. At a power sag, I tried to get the Mac powered off quickly, but OS X wouldn't move. I had to click through the Terminal, X11, and iChat pop-ups. By the time I finished telling OS X that I really wanted to close an inactive chat window, exit Terminal, and stop using X11, the power was out. The Return key doesn't speed through the pop-ups, either; I had to click with the mouse on each pop-up. I want an AppleScript or something that makes OS X understand that Shut Down means "power-off". I assume that a power cut while OS X is caching data is not good for the system. :(
     
  15. mkrishnan Moderator emeritus

    mkrishnan

    Joined:
    Jan 9, 2004
    Location:
    Grand Rapids, MI, USA
    #15
    Well, for this, executing "shutdown -h now" at terminal (which it sounds like you already had open) will definitely do what you need. No requesters, no prompts, and the system will shutdown quickly and safely.

    Although I guess we notebook users are used to just pulling the cable and running on battery. ;)
     
  16. rainman::|:| macrumors 603

    rainman::|:|

    Joined:
    Feb 2, 2002
    Location:
    iowa
    #16
    This is rich, a user complaining because OS X won't automatically dump all open documents/programs to do something most users wouldn't want. Really, if the OS worked the way you want, even accidentally clicking "log out" would mean all open data would be lost. I'm guessing the worldwide bitching that would result in outweighs your complaint :)

    Anyway you have a solution, write an Applescript to do your dirty work, just don't forget this when you suddenly realize, oops, I didn't save that document first... Otherwise, quite frankly, the power outage would have been pretty much fine for the computer... it's a little hard on the power supply, but cut power almost never results in hardware damage. Realistically, there was no point in trying to "kill" everything first, as the power going off does that anyway, faster. Either way there's going to be software damage.
     
  17. arogge thread starter macrumors 65816

    arogge

    Joined:
    Feb 15, 2002
    Location:
    Tatooine
    #17
    I did that on a Solaris box. I lost five minutes of work, and then turned on the logout confirmation. OS X has the Shut Down confirmation on by default, which makes it a confirmed action. What OS X doesn't need is a 120-second timer on the confirmation box. OS X could show one box that says something like "The following processes are running... are you sure that you want to kill these processes?" If you press the Return key, the system should kill the processes and power-off. It's behaving like Microsoft "Are you sure?" Windows. :eek:
     
  18. mkrishnan Moderator emeritus

    mkrishnan

    Joined:
    Jan 9, 2004
    Location:
    Grand Rapids, MI, USA
    #18
    Did you read my post? If you're also using Solaris, I don't see why you'd be afraid of a terminal command. It does exactly what you're expecting it to.
     
  19. arogge thread starter macrumors 65816

    arogge

    Joined:
    Feb 15, 2002
    Location:
    Tatooine
    #19
    Thanks! That command worked exactly as expected. A quick "su" and OS X responded. :)
     
  20. arogge thread starter macrumors 65816

    arogge

    Joined:
    Feb 15, 2002
    Location:
    Tatooine
    #20
    It works faster than I could post. I used it with several open applications and multiple users and it Just Worked.
     
  21. arogge thread starter macrumors 65816

    arogge

    Joined:
    Feb 15, 2002
    Location:
    Tatooine
    #21
    It happened again today. I had several applications open and needed to power-off due to a power sag and expected outage. The Mac went down faster than the Linux server. The next problem is how to rapidly dissipate the electrical current from the watch batteries and the power supplies. :eek:
     
  22. mkrishnan Moderator emeritus

    mkrishnan

    Joined:
    Jan 9, 2004
    Location:
    Grand Rapids, MI, USA
    #22
    Haha...well, one problem solved, one more new one? :eek:

    Why are the watch batteries an issue, out of curiosity?

    And how do people normally deal with the power supplies? I guess all us home users just take the liberty of ignoring that issue, but it would be a bad, bad idea for mission critical stuff..... :(
     
  23. arogge thread starter macrumors 65816

    arogge

    Joined:
    Feb 15, 2002
    Location:
    Tatooine
    #23
    I'm trying to eliminate anything that could carry a surge. Watch batteries and power supplies carry an electric current and are connected to the circuit paths. If a magnetic surge occurred, that current would be multiplied and quickly destroy the hardware. Since most of the computer electronics are unshielded, I supposedly need larger system housings to protect against this type of surge.
     
  24. TEG macrumors 604

    TEG

    Joined:
    Jan 21, 2002
    Location:
    Langley, Washington
    #24
    To not have to deal with the "Log Out" issue, try the following...

    Open Applications:Utilities:Keychain Access
    Open Preferences

    Select "Show Status in Menu Bar"

    Now a Lock will appear at the top of your screen. In it is the options to lock the screen, or lock the keychain. I use it all the time, because logging out all the time when I leave is time consuming, it kicks on my screensaver, and requires a password to get past it. Even if you restart, and have automatic login enables, the SS activates instantly, and requires your password.

    TEG
     
  25. kalisphoenix macrumors 65816

    kalisphoenix

    Joined:
    Jul 26, 2005
    #25
    This issue vexes me. What also vexes me is when people sincerely make suggestions for you to alter your behavior or needs in order to conform to those of your operating system.

    I've grown comfortable with Bash scripting and (more recently) Applescript. There are several I have shortcutted -- for instance, when a Brazilian is trying to violate my b0x, I have a few that... oh, nevermind ;) Anyway, you might consider creating an Applescript that tells your most commonly-used applications to save files under <date>_time_tmp_file.extension or whatever so that you don't necessarily overwrite a previous copy of your file, but you don't lose your interim work either.

    Both the blessing and curse of UNIX is that it's such a @#$%ing DIY OS.

    That aside -- Windowmaker always saves my desktop, complete with open files. KDE doesn't? (not too surprised about CDE, it's a POS)
     

Share This Page