Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've set up a little media center computer running Arch Linux.

I want to eventually get it so that there is no keyboard or mouse required. Right now I want the solution to be SSH. My problem is that when I do something like mplayer movie.mpg over an ssh shell, I'll just get vo: couldn't open the X11 display ()!

How do I get this to work correctly and play on my TV(the display the media center computer is hooked to)?

share|improve this question
up vote 2 down vote accepted

If your media system is connected to the TV, it depends on whether you are using X windows or a framebuffer to display graphics.

If you're using X windows, then since you DON'T want the output on YOUR machine, then you need to be logged in as the SAME user the X windows system is logged in as, (it's a permissions thing really).

Enter this environment variable export command in your ssh session to have X11 requests redirected to the local machine (the media box)

export DISPLAY=:0

This will cause mplayer to be redirected to the local media-box video, you'll still be able to control mplayer with the ssh connection using the various keyboard commands it supports. (f for fullscreen (or -fs option), q-quit, p-pause, etc...)

If you're using X11 to display, check out the 'xhost +localhost' command and possibly re-enabling the insecure unrestricted port 6000 access for your Xserver. Again, depends on how you set up your media box.


if you're not using X windows, it'll probably work using the framebuffer output option of mplayer.

Try using mplayer with the '-vo fbdev' or '-vo fbdev2' option, telling mplayer to use the framebuffer to display output. Check the mplayer manual for more details. Those are the most likely to work, but there are other options, but they get more complicated.

share|improve this answer

You don't even need a remote X11 server to do that:

ssh cat movie.mpg | mplayer -
share|improve this answer
Wow. Actually, that's completely genius... although it doesn't quite solve my use case where I (practically) don't have physical access to the box and the hardware console – Earlz Jul 8 '13 at 23:37
I've tried that, and all that happens is mplayer says its playing, but nothing is happening. – CMCDragonkai Apr 13 '15 at 0:59

You can also use sshfs to mount the directory over ssh. This allows you to seek your movies, which is not possible with stdin option. Further, the method is permanent so you don't need to do this for each file:

sshfs mediacenter:/home/user/videos /home/user/videos

now everything under mediacenter:/home/user/videos is locally available.

share|improve this answer

You should connect to your remote box via ssh with -X option. If you connect with X option and if you have installed xorg on the remote box, you could run your command on remote box and mplayer will be visible on your local screen.

share|improve this answer
I know how to do this. What I want though is for mplayer to be visible on the remote screen – Earlz Jun 24 '12 at 6:14
Then you should run the following commands one by one: xhost + export DISPLAY=0:0 mplayer media.mpg – scriptmonster Jun 24 '12 at 7:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .