Open a movie with VLC from command line via SSH

I have a linux machine connected to the tv and being the lazy person I am, I would like to sit on my laptop, SSH into the linux machine and play a movie in full screen. I've tried running the command:

vlc -f perfectly-legal-file.mp4 

This just runs vlc media player inside the terminal (which is pretty cool) but I'm trying to get it to run on the TV.

How would I do this?


Solution 1:

Should be able to do this by first setting the $DISPLAY environment variable.

$ export DISPLAY=:0
$ vlc -f file.mp4