Is it possible to tell a Program to use the root Library rather than User one?

Joined
Nov 24, 2017
Messages
51
Reaction score
0
Points
6
One of my programs (Specifically a game called Terraria) keeps data in the library folder of each user. What I'd like is for that data to only be present in the root library so that all users access the same data. Is there some terminal trick for that?
 

chscag

Well-known member
Staff member
Admin
Joined
Jan 23, 2008
Messages
65,248
Reaction score
1,833
Points
113
Location
Keller, Texas
Your Mac's Specs
2017 27" iMac, 10.5" iPad Pro, iPhone 8, iPhone 11, iPhone 12 Mini, Numerous iPods, Monterey
Was the program (game) installed separately for each user or was it installed for all users?
 

Raz0rEdge

Well-known member
Staff member
Moderator
Joined
Jul 17, 2009
Messages
15,779
Reaction score
2,130
Points
113
Location
MA
Your Mac's Specs
2022 Mac Studio M1 Max, 2023 M2 MBA
If you know which folder is used, then you can create a folder with that name in the /Library folder and link that to every user's Library folder. This would mean that all the users will access the same data and as long as they are doing it at different times, that should be fine.

The commands would be:
Code:
$ cd /Library
$ sudo mkdir <folder>
$ cd /Users
$ cd <username>/Library
$ ln -s /Library/<folder> .

<folder> here is whatever that game data folder happens to be and you would repeat the last 3 commands for every <username> on your system.

As always, know what you are doing with the commands and triple-check that you are doing all of this in the right place. You are responsible for breaking anything.
 
Joined
May 21, 2012
Messages
10,758
Reaction score
1,199
Points
113
Location
Rhode Island
Your Mac's Specs
M1 Mac Studio, 11" iPad Pro 3rd Gen, iPhone 13 Pro Max, Watch Series 7, AirPods Pro
Also, you should have a “Shared” user, which all users will have access to?
 
OP
T
Joined
Nov 24, 2017
Messages
51
Reaction score
0
Points
6
If you know which folder is used, then you can create a folder with that name in the /Library folder and link that to every user's Library folder. This would mean that all the users will access the same data and as long as they are doing it at different times, that should be fine.

The commands would be:
Code:
$ cd /Library
$ sudo mkdir <folder>
$ cd /Users
$ cd <username>/Library
$ ln -s /Library/<folder> .

<folder> here is whatever that game data folder happens to be and you would repeat the last 3 commands for every <username> on your system.

As always, know what you are doing with the commands and triple-check that you are doing all of this in the right place. You are responsible for breaking anything.
So must my data folder already be in the root Library, my Library, or elsewhere? And should I make an empty proxy data folder where one should be for each user?
Also, you should have a “Shared” user, which all users will have access to?
I kind of already do...
 

Raz0rEdge

Well-known member
Staff member
Moderator
Joined
Jul 17, 2009
Messages
15,779
Reaction score
2,130
Points
113
Location
MA
Your Mac's Specs
2022 Mac Studio M1 Max, 2023 M2 MBA
If you want multiple users to access a folder, you should put it in some generic location accessible by all. The /Library folder works for that. You can create a new folder if one doesn't already exist. You would remove the local user-level folder and just create a link to the global shared one.
 
OP
T
Joined
Nov 24, 2017
Messages
51
Reaction score
0
Points
6
What does it mean if the aliases I generate appear as page icons and don't take you anywhere when clicking them. And when opening the game/application it will refuse to open? And then when I try to force it to open by opening its package contents and running the exec file, it give me an error on the terminal reading something like "too many symbolic links"? I did have a couple of failed attempts to set this all up. Did I mess anything up big time?
 

Raz0rEdge

Well-known member
Staff member
Moderator
Joined
Jul 17, 2009
Messages
15,779
Reaction score
2,130
Points
113
Location
MA
Your Mac's Specs
2022 Mac Studio M1 Max, 2023 M2 MBA
I'm not sure how you are creating the alias, but I tried the "ln -s" method I mentioned in my earlier post as well as right-clicking on a folder and choosing Make Alias and moving that Alias to a separate folder. With both of these methods, I could go to the folder where the aliases reside, double-click and be taken to where they point to without any issues.

If you get the "too many symbolic links" error, you've basically created an alias to an alias and thus are just looping. So I would recommend, cleaning things out and starting again from scratch.
 
OP
T
Joined
Nov 24, 2017
Messages
51
Reaction score
0
Points
6
Will that just require deleting the generated aliases or restoration from recovery mode?
 

Slydude

Well-known member
Staff member
Moderator
Joined
Nov 15, 2009
Messages
17,622
Reaction score
1,083
Points
113
Location
North Louisiana, USA
Your Mac's Specs
M1 MacMini 16 GB - Ventura, iPhone 14 Pro Max, 2015 iMac 16 GB Monterey
You should be able to just delete the created aliaases.

@Raz0r Rather than much about in the /Library file what about using the Library folder inside the Shared user folder.
 
OP
T
Joined
Nov 24, 2017
Messages
51
Reaction score
0
Points
6
Thanks guys. While I do still have a few technical hurdles I've achieved my initial goal.
 

Slydude

Well-known member
Staff member
Moderator
Joined
Nov 15, 2009
Messages
17,622
Reaction score
1,083
Points
113
Location
North Louisiana, USA
Your Mac's Specs
M1 MacMini 16 GB - Ventura, iPhone 14 Pro Max, 2015 iMac 16 GB Monterey
Thanks for letting us know. Glad you got things sorted out to your satisfaction.

BTW Just out of curiousity, and for the benefit of othehrs who may be interested, what method did you use to solve this?
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top