0
Is it possible to create, using terminal on a mac, for a mac, a symlink or an alias to ANY currently logged in user of a mac?
This symlink/alias is to be included as a "drop destination" for a folder in a software package.
There are a few issues explaining how to make absolute vs relative symlinks, but this has to take into account that it is to be ANY system´s currently logged in user. And only be a symlink or an alias file, not an installer. That´s a bigger thing.
Here is my current best attempts:
symlink with ln -s
and relative link, works well, but lacks the user account wild-card:
cd Desktop/any-folder/
ln -s "../symlinks" symlink-file
That one references a directory, "symlinks", in ../ (Desktop/), also on Desktop. Works if the relational structure is intact. I know that I need only remove the "" marks to make it a absolute link path.
But my attempt to create a omni-functional user folder link is not working:
ln -s "~/Desktop/symlinks" symlink-file
That´s the one I need to solve, if possible. Other libraries or ways are also welcomed.
Okay, that´s the answer I was afraid of. So in your own account it works, but delivering to another person´s system is not going to work. Adding a shell script will work, but would require an actual installer. My solution is instead an Automator .app, a droplet for dropping the files on that first checks the user´s home folder and adds a path, then copies the files. That works. Thanks for the help. – andyNilson – 2020-01-19T00:25:09.480