0

problem

I can execute VLC from the command line using a .bash_profile alias but not using a sym link.

📝 VLC is located at /Applications/VLC.app/Contents/MacOS/VLC on my machine


sym link

I tried two different sym links from my user's bin:

  • ln -s /Applications/VLC.app/Contents/MacOS/VLC vlc
  • ln -s ../../../Applications/VLC.app/Contents/MacOS/VLC vlc

For both, the terminal simply outputs the VLC version and exits:

🈚️ ☞☞☞ vlc Peter\ Tosh\ -\ Stepping\ Razor-aLJFRgE4Ywk.mp3
VLC media player 3.0.3 Vetinari (revision 3.0.3-1-0-gc2bb759264)
🈚️ ☞☞☞

alias

When I made an alias for VLC in my .bash_profile:

alias vlc="/Applications/VLC.app/Contents/MacOS/VLC"

things worked fine

🈚️ ☞☞☞ vlc Peter\ Tosh\ -\ Stepping\ Razor-aLJFRgE4Ywk.mp3
VLC media player 3.0.3 Vetinari (revision 3.0.3-1-0-gc2bb759264)
[00007fe25051eaa0] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.

I can just continue to use the alias, but I'd like to understand why the sym links didn't work.

This answer discusses differences between symbolic links and aliases but doesn't seem to resolve my particular problem.

  • Does symlink named VLC (uppercase) works? – Kamil Maciorowski Dec 8 '18 at 23:47
  • I see no reason for this, unless there is another vlc already in existence. Enter type -a vlc to see if there is (for instance) a function with this name or a script higher in the PATH list, which would supersede the link. – AFH Dec 8 '18 at 23:51

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.