SSH – How to Play Remote Movie on Remote Computer

audioremotesshvideox11

I have two computers (a desktop and a laptop) running linux connected to my local area network. I like to ssh from my laptop over to my desktop and run programs there, and sometimes listen to music on my desktop, which is connected to my stereo system. Lately, I've been wanting to play movies on the desktop and desktop screen, but cue them from my laptop across the room.

Unfortunately, I cannot play a movie in the current X session running on my Desktop on from my laptop. What is odd about this is that I can listen to the audio coming from the speakers that are hooked up to my desktop, by playing the audio files over ssh! This tells me that there must be a way to send the movie to that Xsession, from the ssh shell that I am connected to.

Does anyone have any ideas about this?

Best Answer

All you have to do is set your $DISPLAY in your ssh session to match your desktop's display.

You could echo $DISPLAY from a terminal on the desktop, and then export $DISPLAY="what above said" in your ssh session.

Related Question