Search code examples
macosterminalsymlinknohup

How to open a symlink without the terminal window popping up?


How can I open a symlink without the terminal window popping up? Moreover, when I close the terminal window, the application quits as well. I tried using

nohup open symlink1

without any results. I have made a symlink to the iTunes executable (the one inside the contents package, NOT the iTunes.app) which I want to be able to open by double clicking the link, but without the terminal window popping up.


Solution

  • I just figured out a solution:

    Make an executable (intended as the link)

    #!/bin/bash
    cd /Applications/iTunes.app/Contents/MacOS
    nohup ./iTunesX &
    exit
    

    and change under preferences in Terminal

    When the shell quits: close if the shell exited cleanly

    Change iTunesX and the cd path to any desired target.