sandbox an app on a disk image?

Discussion in 'macOS' started by brijazz, Jul 7, 2013.

  1. brijazz macrumors 6502

    brijazz

    Joined:
    Jul 31, 2008
    #1
    I have an app that I'd like to sandbox on a disk image. Essentially, I'd like to run the app so that its Application Support files, Preference files, etc. reside exclusively on the disk image, and don't move into the standard ~/Library locations.

    My current solution is to move the App Support/Preference file structure onto the disk image, and then symlink to it from the ~/Library/ folders that the app creates. It works, but it's a little kludgy. Is there a better way?
     
  2. maflynn Moderator

    maflynn

    Staff Member

    Joined:
    May 3, 2009
    Location:
    Boston
    #2
    Why do you want to do that?

    Are you looking to symlink your ~/Library or the application's files that get created in ~/Library
     
  3. brijazz thread starter macrumors 6502

    brijazz

    Joined:
    Jul 31, 2008
    #3
    I currently symlink any ~/Library/Application Support and ~/Library/Preferences files that are created by the app in question.

    What I really want is a way to run the app from the disk image so that it doesn't try to write to the standard OS X locations listed above.
     
  4. maflynn Moderator

    maflynn

    Staff Member

    Joined:
    May 3, 2009
    Location:
    Boston
    #4
    But why do you want to do that? What advantage do you gain by such an action.

    I'm just trying to understand the actions you're taking?

    What application are you wanting to do this to?
     
  5. brijazz thread starter macrumors 6502

    brijazz

    Joined:
    Jul 31, 2008
    #5
    I want to do this so that once I eject the disk image, it's as if the app never existed on my machine in the first place. I keep some files on an encrypted disk image for extra security/privacy. I tag them with "Leap". I don't use Leap on any files that aren't on the disk image, so I don't see the need to leave it's prefences plist or various app support files behind once I eject the image.
     

Share This Page