Multiple instances of VLC media player on MacOS

in technology •  2 months ago

Window management and multiple instances of the same app on MacOS is a disaster.

What about VLC?
I see a lot of overly complicated scripts suggested on-line. Like this one.

Essentially the script relies on the 'open -n' command in the terminal. 'man open' says:
"-n Open a new instance of the application(s) even if one is already running."

Thus one way to get multiple windows with VLC is to type this in the terminal:

$ open -n /Applications/ *whatever file or URL*

I prefer the classic and more elegant way:

$ vlc /path/to/file.mp4 &

What makes this possible?
If you use homebrew as your package manager, new apps are added to your $PATH. This allows the simple 'vlc' command in the terminal.

At the end I use the '&' symbol to put the process in the background. The terminal can be closed but VLC will run in the background. If you want to see all VLC instances list them with 'jobs' and kill them with 'kill $[number]' depending on the 'jobs' number of the instance you want to kill.

$ jobs
[1]+  Running                 vlc &
$ kill %1
[1]+  Done                    vlc

If you wonder how to install VLC via the homebrew package manager these are the commands:

$ /usr/bin/ruby -e "$(curl -fsSL"
$ brew cask install vlc

VLC Logo


Type in the terminal:

$ vlc /path/to/file or URL &
Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!