osx - How to share a user ~/Library folder over two accounts?

24
2014-04
  • Matt Gardner

    I find it easier to focus on a project if I dedicate an entire user account to it. I fast-user-switch between work mode (documents and programs I'd rather not close) and entertainment mode (user account holding tv shows, movies, music, which is hooked up to my tv in the living room).

    The issue I've now run into is preferences. Because I'm constantly tweaking keyboard shortcuts, etc. in both accounts, the two users are never really in sync. Searching around I uncovered this guide for symlinking an iTunes library:

    1) copy the master iTunes folder to the /Users/Shared directory
    2) symlink each user's iTunes directory to the shared one
    3) for each user, set the iTunes library destination to the shared on
    4) install WinSwitch
    5) create a tiny program that chmod's the iTunes directory to 777 recursively
    6) run this program on each FUS with WinSwitch
    7) run this program on login of each user
    

    Is this a good way to manage the ~/Library folder? Is it fine to have both user accounts accessing the same files at the same time?

    Thanks for your help.

  • Answers
  • Jonik

    Is it fine to have both user accounts accessing the same files at the same time?

    I think it depends on the application whether it's ok to have more than one instance accessing the files under ~/Library at the same time. Some apps might not like it at all. Given this, you might not want to share the whole ~/Library folder, but specific subfolders of it. (I've successfully shared stuff like Calendars, AddressBook data, Adium and Skype preferences and logs (under Library/Appication Support), and so on.)

    I've found Dropbox (which was recommended in my question about sharing stuff between several Macs) and symlinks a pretty decent way to do it; this has the benefit that it works across several computers. If you are only using one, however, Dropbox may obviously be an overkill, and simply having a local shared folder (something like what you described in the question) might suit you better.

  • James Polley

    For the specific case of iTunes, it seems a lot simpler to just:

    • start iTunes in the entertainment account
    • make sure it's sharing the library over the network
    • switch to the work account
    • Launch iTunes
    • Connect to the shared library and play music from there.

  • Related Question

    osx - How to use an AFP network share with fast user switching?
  • Timo Kosig

    I'm trying to mount an AFP network share from my NAS so that multiple users can have access when using Fast User Switching (FUS).

    Once I mount the share as User1 and log into User2's account the mounted share will show up but is not accessible. Same the other way around.

    Both users are in the group wheel. Is there any way to specify permissions of the newly mounted share? I looked into the man pages of mount, fstab, mount_afp but couldn't seem to find any way how to specify the permissions of the mounted share.

    The problem is e.g. if you have a shared iTunes library with music files on say an AFP network volume called music that the first user will mount that under /Volumes/music. If the second user decides to mount it as well (while the first user has still mounted it) a new mount point will be created and the volume is mounted to /Volumes/music-1.

    Since iTunes stores the file path as something like /Volumes/music/album/artist/title.ext in an XML file, iTunes will say it can't find the file even though the network share is mounted (but the path is wrong now and the user doesn't have access to the other mount).

    Any thoughts on this issue? Any help greatly appreciated!


  • Related Answers
  • dakh7

    I'm not sure if your situation is similar but I use netatalk on my NAS; I had to make sure permissions were set allowing both users access in the AppleVolumes.default config file in order for the share to mount properly on my mac so that both users have access to it.

    Also I think by default User2's desktop won't show the share, you have to manually go to it.

  • James Snyder

    I think what you're going to need to do is have the mount done automatically before logging in, or handled by Mac OS X's automounter called autofs. Here's some general info on setting up automatic mounts.

    This thread over on the ReadyNAS forum may describe something closer to exactly what you're looking for.

    Also note, as in one of the other replies here, make sure permissions are done appropriately on the NAS such that all your users can read/write to the afp mount.