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

Exit iPhoto/iTunes when Fast User Switching Apps
I use this hint to share both iTunes and iPhoto directories among users on a local machine. This works very well, however one difficulty arises which relates to fast user switching. If someone has iPhoto or iTunes open, other users are prevented from running or modifying the database (you get a "database locked" error). To solve this, install WinSwitch, a replacement for Apple's FUS tool with many improved features (including a lovely small icon view for the menu bar). After installation, open the WinSwitch preferences, and click on "Go to Switch-Out Items". This directory contains scripts and aliases which will be run when you switch to another user.

Open the Script Editor, and create a script with these two lines:
tell application "iPhoto" to quit
tell application "iTunes" to quit
Save this as an application (I called it Quit iTunes and iPhoto, and stored it in the Applications folder). Command-option drag this app to the Switch-Out Items folder to create an alias. For each user who shares iTunes and/or iPhoto, install WinSwitch and create a similar alias.

Click on the alias, and get info (Command-I). Under Ownership and Permissions, open the Details tab and change Group access to Read Only. This is necessary since the first hint mentioned above (if you use it) gives group write access by default, and WinSwitch, for security reasons, refuses to run anything with write access for anyone but owner.

Now, whenever you switch to another user using the WinSwitch dialog, iTunes and iPhoto will exit, and the next user will have no troubles.
    •    
  • Currently 1.60 / 5
  You rated: 4 / 5 (5 votes cast)
 
[12,035 views]  

Exit iPhoto/iTunes when Fast User Switching | 10 comments | Create New Account
Click here to return to the 'Exit iPhoto/iTunes when Fast User Switching' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Exit iPhoto/iTunes when Fast User Switching
Authored by: eno on Dec 14, '06 09:27:28AM

Cool. Good point about changing the group privs.



[ Reply to This | # ]
Exit iPhoto/iTunes when Fast User Switching
Authored by: Swordfish on Dec 14, '06 10:21:12AM

FYI, Apple's fast user switching also has "a lovely small icon view for the menubar" ;)



[ Reply to This | # ]
Exit iPhoto/iTunes when Fast User Switching
Authored by: Han Solo on Dec 16, '06 07:11:51PM

Yes, but the one in WinSwitch is better....



[ Reply to This | # ]
Exit iPhoto/iTunes when Fast User Switching
Authored by: jdsmith on Dec 18, '06 10:12:49AM

Yes, but it's a boring gray profile, instead of a small version of the User's icon/picture.



[ Reply to This | # ]
How to switch form command line?
Authored by: SOX on Dec 14, '06 12:43:42PM

There used to be a way you could FUS from the command line but it no longer works for me. Anyone know how to do this now. There'd be no need for these propgrams if we can just write our own switch scripts.



[ Reply to This | # ]
How to switch form command line?
Authored by: eno on Dec 15, '06 08:25:01AM

Why don't you look at the WinSwitch source code (it's open source) and figure out how to do it?



[ Reply to This | # ]
Exit iPhoto/iTunes when Fast User Switching
Authored by: olliesoldest on Dec 20, '06 10:06:23PM

This is a great tip, but I am unable to make it work. I've followed the instructions exactly, including the bit about making my user the only one with write permission, but it seems that WinSwitch is not executing the script on Switch-Out. If I double-click the alias in the Switch-Out Items folder it works as expected (shutting down both iPhoto and iTunes if they are running) but when I use WinSwitch to switch to another user and then back, iPhoto is still running. Any ideas? Is there a WinSwitch log I can check to find out if the WinSwitch program is being denied access to the "Quit iPhoto and iTunes" application? Thanks for any suggestions, and Happy Holidays.



[ Reply to This | # ]
Exit iPhoto/iTunes when Fast User Switching
Authored by: jdsmith on Dec 21, '06 10:32:13AM

WinSwitch logs to the console, so you can open Console.app to see why it doesn't run the script (might have to switch back and forth a few times and clear the console to ensure you've got the right message). My guess is that your permissions on the alias are incorrect. The only change to you needed to make is to remove write-access to group. It should still be executable. It should also be owned by you (and not, e.g., root), and the directory it's in should be readable.



[ Reply to This | # ]
Exit iPhoto/iTunes when Fast User Switching
Authored by: olliesoldest on Jan 09, '07 06:18:23PM

That was it. I changed the group permissions on the two folders (Switch-Out Items and Winswitch) to group read only and the tip now works as I hoped it would. Thank you!



[ Reply to This | # ]
WinSwitch doesn't work on Leopard
Authored by: thuldai on Feb 18, '09 01:39:37AM
Seems WinSwitch is not being updated and does not work with Leopard:
https://rails.wincent.com/forums/winswitch/topics/339

I also couldn't get it to work, like some other posters in that forum above. Also doesn't seem like the developer has time or interest in making WinSwitch Leopard-compatible.

If anybody has an update to this hint (or to WinSwitch) I'd be very interested.


[ Reply to This | # ]