2

I have a PI3 with Arch Linux on it, and it is connected to a small projector through hdmi. The PI is headless and I connect to it via ssh.

I would like to launch an X application displaying videos and have it displayed in the projector.

I have tried doing the following, while the raspberry is plugged in and I can see some tty being projected on the wall

ssh myraspi
export DISPLAY=:0
startx

at which point I get a

No screen found (EE)

Not sure how to go on from here. A copy of the verbose log is here:

http://pastebin.com/WDpbXAx1

1

If x is already started (locally on the pi) you can just start a x program true ssh and it wil display om x ( in your case the projector) i used this with vlc , just add te parameters to enter in fullscreen

in my opinion it's nicer to do this with using a web-biased controller https://wiki.videolan.org/Control_VLC_via_a_browser/

Control_VLC_via_a_browser

0

You can't startx over ssh. You would better go with VNC to run GUI applications on the Pi's screen.

  • I don't think that's true, I have seen people online discussing this and allegedly should work, I believe I need to configure the pi properly. I will have a look into vnc – Three Diag Dec 11 '16 at 18:17
  • So let me know when you will find a way how to do that. – Jakuje Dec 11 '16 at 18:18
  • See above answer, it works! Notice that my only purpose was getting something on the screen attached to the PI. I currently have an ssh terminal open on my laptop to control the PI and a movie playing. If you were to start the GUI it would still be unusable (because the mouse and other devices going through X still have to be attached to the PI), but I have read on the internet you could also "hijack" input device to effectively controll the PI remotely via ssh – Three Diag Jan 13 '17 at 19:39
  • But it is something completely different then it was in the question. You are not running startx over ssh, but showing the windows on the screen locally attached to the Pi. – Jakuje Jan 14 '17 at 14:17
  • I am doing exactly what I reported at the beginning of my question. From my laptop: ssh user@raspi startx -- :0 then the .xinitrc contains a call to mpv. – Three Diag Jan 14 '17 at 14:21
0

If the videos can be played in omxplayer, you won't need to start an X session. Just type omxplayer -hdmi http://video.example.com/video.mp4 (substituting whatever video URL you want) and it should play. This does require you to know the video's "final" URL, not just the URL of some page that embeds it, but the huge advantage of omxplayer is that it uses the Pi's GPU rather than its CPU, hence it can play high-definition videos even on a Pi Zero (or Zero W) as long as you've set gpu_mem high enough in config.txt (384 works well, although on a Zero that means you'll have only 128M left and had better not try to run an X desktop without a swapfile). On the 3, CPU and RAM is not quite so much of a worry as on the Zero, but even so I expect omxplayer will work better than VLC et al for a good few videos.

For the final tweak, find out the native resolution of your projector, find out which HDMI mode number is closest to that resolution, and use the tvservice command to select it. E.g. tvservice --explicit='CEA 3 HDMI' gives 720x480 (16:9) which works well with the Miroir Mini Projector. Run this before running omxplayer and you should get some nice clear video renditions.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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