raspberry pi3 can not launch application on primary HDMI Display, can launch on remote using ssh -x

249 Views Asked by At

I had built console core image for raspberry Pi3, and I am able to boot the Rpi3 successfully using SD card. I have created an electron app which is able to launch on remote display over ssh. However when I launch the application on Monitor connected through HDMI Cable, It gives following error

Can not open Display :0.0

I have seen many people asking this question for not able to launch on remote display, which works fine in my case.

Can anyone help in this?

2

There are 2 best solutions below

0
On BEST ANSWER

Console core image means that there is no xserver running, and hence no display :0. Try getting started with core-image-x11 maybe, or whatever suits the RasPi.

0
On

With console core, you don't have an X server running to display on.

You can upgrade your system to include the X installation -- search for 'install pixel desktop' -- or you could just refresh the card with the lite or full image.

If you set the Pi to auto login to the pi account, you can start your application on login by adding it to the bottom of .xinitrc. You could also start it from a remote ssh, displaying on the local display, by setting DISPLAY=:0 in the environment before you start. You'll need to explore the world of X Windows authentication to make this work. See the man page for the xhost command, for instance.

(This is an expansion of LetoThe2nd's comment, which probably should have been an answer instead.)