Startup program execution under other username

If you do, it doesn't let you run another instance of it (as another user or as the user already running it - just won't let you run two instances).

Wrong. The whole point of this discussion is to automate something that already works. we already know that you CAN have itunes running for two different users. one shares, the other sees it and can play.
 
I mean it won't let you run two instances this way. The second iTunes will just quit (and make the first one active) when you try doing it like this. I know you can have more than one running with fast user switching.

Besides, if you open the one with the music, you don't need to open another one just to share those - you can play them directly. :p
 
I have spend some time trying, trying and trying. As you may have guessed I did not succede to start iTunes using the proposed sudo -b -u command. :(

To say the truth iTunes did start if I ran the command from the BOSS account using sudo -b -u BOSS. However, all of the functionalities of iTunes were not available. Particularly the one I need, Music Sharing. :mad:

Any further suggesstions are welcome. Othewise thanks for the time and advice. ;)
 
i think applescipt may be a better option

have the computer login automatically as BOSS
then a startup applescript that launches itunes and then logs out (fast user swtiching)
hopefully then the computer will be at the login screen, with itunes running in the background under user account boss
 
profx said:
... and then logs out (fast user swtiching)
hopefully then the computer will be at the login screen, ...

An earlier statement indicated that switching to the login screen with applescript was not possible. Are you aware of a way to do this?
 
Ok, i did some research and here we go. I have tested this and it works.

Add this applescript to your startup items and your away!

Code:
tell application "iTunes"
	activate
end tell
do shell script ("/System/Library/CoreServices/Menu\\ Extras/User.menu/Contents/Resources/CGSession -suspend")

Obviously you have to have the computer automatically log in on startup in the account boss, then the script will run, launch itunes and then put you back to the login screen leaving itunes running happily in the background.
 
Super, wonderful, this works! :D :D :D !

Just for the completeness, there is a catch. Whan you shutdown the Mac it suddenly screams that some other user is still logged in. What I did was to have BOSS do my backups sometime late night and auto-shutdown afterwards. So now family will login/logout only and music is available.

Thanks to all for the input - took some time - but worth it.
 
Back
Top