Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

3 Answers 3

up vote 1 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 your-box.example.com 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

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.