Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

My wife use separate accounts and quick user switching on a MBP running 10.6. Sometimes I want to log her out to free up some RAM, but I'd like to avoid logging in as her, logging out, then logging back in as me.

I have seen a terminal solution... is there a better way? Thanks!

share|improve this question
3  
You need to better define "is there a better way". For me, not much (computer-wise) is better than a terminal. If you want an app, just wrap the terminal command in an automator or applescript app. –  user588 Oct 27 '10 at 0:47
1  
@mankoff, good point! But this isn't an Arch Linux forum, so let's assume I want a GUI/built-in solution :). But, you're right, I can just write a shell script. –  Richard Herron Oct 27 '10 at 2:12
2  
Here is the link to the script solution (I saw it before posting, but it's from 2005, so I assumed that by now this simple feature must have been incorporated into the GUI). forums.macrumors.com/showthread.php?t=118545 –  Richard Herron Oct 27 '10 at 2:13
    
there is no built-in gui solution that i know of... –  Robert S Ciaccio Oct 27 '10 at 3:29
    
OK, thanks, All! When I write a good script, I'll post it back here. –  Richard Herron Oct 27 '10 at 3:51
add comment

3 Answers

up vote 11 down vote accepted

Using the Terminal, you can kill her loginwindow process and any programs she has open will be closed... but this will cause her to lose any unsaved work she has! In fact, this is the very reason you need to log in as her to log out: When you log in as her, all her programs again have access to the GUI, so they can prompt you to confirm closure, save changes or take other action before logging out.

If you're sure that she only has things like a web browser, iTunes, etc open, not Pages, Word, Photoshop, or anything else with documents, then you could try from the terminal:

kill `ps awwwwux | grep her_short_username | grep loginwindow | grep -v grep | awk "{ print \$2 }"`
share|improve this answer
1  
Agree with the warning that if you don't log in to see what she's doing, then you don't know what you might cost her by logging her out. –  khedron Nov 5 '10 at 17:49
    
Yeah, you're right. Most of the time it's web-browsing... But one time it won't be! Thanks! –  Richard Herron Nov 6 '10 at 0:58
3  
If you force-terminate her loginwindow through Activity Monitor.app you could conveniently glance at the same time what other processes she has left open. –  koiyu Jul 29 '11 at 11:54
add comment

You can use the Activity Monitor to log another user out by killing their login process:

  1. Run Activity Monitor
  2. In the filter at the top-right, type loginwindow
  3. Click the row with the user's name in the User column
  4. Click Quit Process, then Force Quit, and type your password.

This is just a nicer(?) GUI version of Josh's answer.

Before step 2, you can review the other user's running processes to see if they are running any apps that might lose data on logout.

share|improve this answer
add comment

In my opinion, the possible loss of data far outweights the possible gain in RAM.

Moreover, it has been a long time since Unix was able to swap memory to disk when a process was idle.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.