Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Auto-timeout to the fast user switching window Desktop
While this is far from an original hint on my part, it does pull together several good things into one bucket and provides an elegant solution to address multi-user system screen savers and security.

So what I wanted to do was to use the builtin fast user switching capabilities of Panther as a Screen Saver. By that I mean, when a predetermined, configurable period of time elapsed, I wanted the built in screen saver to activate fast user switching to simply display a new login window without logging the current user out. There are two parts to the solution:

A previous hint that I picked up on when it first came out pointed out how to activate Fast User Switching from the command line in a pretty elegant way and an additional comment there showed how to add that capability to a button on the side-bar for the Finder window. This is the basis of this hint. Get the shell script included there installed somewhere in your path (I selected my Fink file structure since it was outside the main distribution and was "safe" so I added the script as /sw/bin/SwitchUser).

Then go get ScriptSaver and install it. It allows you to run AppleScripts from the builtin Screen Saver function of MacOS. There is a script included with the distribution that is called "Log Out.scpt" intended to log out the current user when activated by manually killing the login window process. This is a little too harsh for my needs, so I modified the script replacing the kill command in there with a call to my /sw/bin/SwitchUser shell script from the first part of this hint.

When all is said and done, you now have the ability to set a configurable time of inactivity before the active user is switched back to a login window using the built-in functions of Panther fast user switching and screen savers. This affords the active user the ability to save his work and log out gracefully at a later date as well as automatically protecting his account integrity and the confidentiality of his data.

I'm sure there are a million other ways to do this, and this may well not be the best out there, but it certainly pulls together some nice functionality into a cool solution IMHO. If anyone has suggestions on improvements, let me know and if there's anything that's not clear, feel free to email for a more detailed description.

    •    
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (1 vote cast)
 
[9,783 views]  

Auto-timeout to the fast user switching window | 14 comments | Create New Account
Click here to return to the 'Auto-timeout to the fast user switching window' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Auto-timeout to the fast user switching window
Authored by: kevinv on Mar 08, '04 10:41:31AM

if you turn on the options to prompt for a password in the screen saver and on wake from sleep, the password prompt includes a button to switch users.

this way might eliminate some confusion for new users about how to do that, and save a button click if you find you have to do it frequently.



[ Reply to This | # ]
Auto-timeout to the fast user switching window
Authored by: leenoble_uk on Mar 08, '04 11:16:37AM

The problem with that and which hopefully is solved by this hint is that if your account has gone to the screensaver or sleep and then another user comes along and switches to their account, when you switch back to your account you end up having to type your password in twice: once to switch, once to deactivate sleep/screensaver mode. It's an unnecessary PITA and a bug which I hope Apple will fix at some point.

---
So, I said ... well, I can't actually remember exactly what I said. But it was one of the most enormously cruel and frighteningly witty put downs ever.



[ Reply to This | # ]
Auto-timeout to the fast user switching window
Authored by: kevinv on Mar 09, '04 11:43:45AM

that happens even if nobody switched users. if you set the option to prompt for password on wake and on wake from screen saver, and leave your computer long enough for both events to trigger, then on return you have to enter the password twice.

yes, it is annoying. you can work around it by disabling one or the other option, but i prefer the extra safety of having both on.



[ Reply to This | # ]
Auto-timeout to the fast user switching window
Authored by: Accura on Mar 08, '04 11:53:13AM

You shouldn't add things to /sw it is not "safe" it is there so fink doesn't get in the way.

Use /usr/local/bin

or even

/putonmydancingshoes/bin

just not

/sw

jameso

---
"The time has come," the walrus said. "To talk of many things..."



[ Reply to This | # ]
Αυτόματος χρόνος αδράνε
Authored by: GORDYmac on Mar 08, '04 02:08:50PM

I wish I could understand this hint, because I would really like to use it. Unfortunately, it's a little too Greek for me.



[ Reply to This | # ]
Auto-timeout to the fast user switching window
Authored by: DaMacGuy on Mar 08, '04 03:25:21PM

This is great, but does anyone have a simple solution for quiting Classic upon switching to the login screen or another user? Classic can't run in two different accounts.

---
-DaMacGuy



[ Reply to This | # ]
Stop processes when you go to the login window
Authored by: a1291762 on Mar 08, '04 06:49:43PM

If you want to ensure things aren't running (like iTunes/Classic, etc) disable FUS. Create an applescript to take you to the login window (search around here for it, there's a bunch of solutions like this: http://www.macosxhints.com/article.php?story=20031102031045417) and use that to "switch". I installed iKey (or some other global keyboard shortcut program) and assigned a key combo to switch to the login window. I also used ScriptSaver to call the loginwindow script.

The trick is to have the loginwindow script quit apps that shouldn't be running when you get to the login window. Like this:

tell application "iTunes" to quit
do shell script "killall TrueBlueEnv" -- not sure how to do this properly
do shell script "/System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -suspend"

I can't verify this because I don't have a Mac with classic to test on.



[ Reply to This | # ]
Stop processes when you go to the login window
Authored by: dfbills on Mar 09, '04 01:05:07AM

How to you escape the space in "Menu Extras" for applescript while preserving the "\ " for the shell?



[ Reply to This | # ]
Stop processes when you go to the login window
Authored by: cougar718 on Mar 09, '04 11:44:43AM

Hello there,

You do not need to escape the space, you need to scape the \ delimiter with another \. So in the previous code posted you would put 2 backslashes instead of 1 like this...

set theResult to do shell script "/System/Library/CoreServices/Menu\\ Extras/User.menu/Contents/Resources/CGSession -suspend"

Good luck

---
Rick alias cougar



[ Reply to This | # ]
Stop processes when you go to the login window
Authored by: michaelaskew on Apr 11, '04 03:41:17AM
That makes perfect sense, but just to show that there's more than one way to do things, here's how I did it: put single-quotes around the command (within the double quotes).

	do shell script "'/System/Library/CoreServices/Menu Extras/User.menu/Contents/Resources/CGSession' -suspend"


[ Reply to This | # ]
Auto-timeout to the fast user switching window
Authored by: sfn on Mar 09, '04 05:07:18PM

Or try out rselph's LoginSwitch.saver. It is hidden in the Moofware Update on his iDisk. Works nicely for me.

http://homepage.mac.com/rselph/FileSharing15.html

---
-sfn



[ Reply to This | # ]
Auto-timeout to the fast user switching window
Authored by: dfbills on Mar 09, '04 11:18:21PM

Perfect!



[ Reply to This | # ]
Auto-timeout to the fast user switching window
Authored by: Echidna on Jan 19, '07 11:05:29AM

You can also use Caio. It's a screensaver, and has the added benefit of giving you a configurable warning time before it logs out. It makes it usable in a hot corner (even without CornerClick). And it's free.

It's a much more elegant solution, and solves the issue that I was having with ScriptSaver where I was getting kicked out to the FUS Login Window immediately after logging back in if I didn't move the mouse around immediately.



[ Reply to This | # ]
Auto-timeout to the fast user switching window
Authored by: ericl on Mar 25, '07 12:48:20PM

Ciao doesn't seem to work on 10.4 with Intel Mac's. This is a shame because it's exactly what I'm looking for



[ Reply to This | # ]