Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

If I create a symbolic link or alias pointing to $HOME/Desktop and place it in a .dmg disk image, then distribute the dmg, will the link still point to the Desktop for the end user?

share|improve this question

migrated from Apr 1 '11 at 23:58

This question came from our site for professional and enthusiast programmers.

Did you ever find a workaround for this? – Barjavel Aug 6 '13 at 11:02
@Barjavel I ended up creating installer and generating the link with postflight script as geekosaur suggested bellow in comments. As long as I remember it didn't work out with just copying. – m0s Aug 6 '13 at 17:56
up vote 1 down vote accepted

No, since the environment variable will be replaced when the link is created. Using ~ will not work either, for the same reason.

share|improve this answer
Thanks Ignacio. I am hopelessly trying to solve the problem described in my following question… Maybe you have some idea how could I create a link to an application on desktop after installation? – m0s Apr 1 '11 at 19:28
Nope. I don't actually know anything about the high-level Mac stuff, sorry. – Ignacio Vazquez-Abrams Apr 1 '11 at 19:46
Per this Package Maker HOWTO, you can use a postinstall or postflight script. – geekosaur Apr 1 '11 at 20:52

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.