I have a raspberry pi, connected to HDMI monitor.
I am trying to run a simple gui (created in qt), and I'm using mpi library for interprocess communication. I want to get this application working on raspberry pi, and on my laptop using something like this
$ mpiexec -f machinefile -n 2 ./mpi_gui
where the machinefile contains the ip addresses for my pi, and for the laptop.
I am following this tutorial. The thing is that this communication is over ssh and I get an "cannot connect to x server" error. I tried
$ mpiexec -enable-x -f machinefile -n 2 ./mpi_gui
to get the raspberry pi gui on my laptop, and it works ok.
Is it possible to run the gui of the raspberry pi on the hdmi monitor to which is connected?
Later edit:
I don't know if I explained well what I want to obtain. I want the process running on the raspberry pi to put the gui on the HDMI monitor connected to it. And the process running on my laptop, to output the gui on the laptop's monitor.
But I can't see how this can be achieved.
1) Using ssh to connect to pi, I enter the command:
sh-4.2$ ssh [email protected]
[email protected]'s password:
pi@raspberrypi ~/mpi_testing/mpi_with_gui/mpi_with_gui/mpi_gui $ DISPLAY=:0 mpiexec -n 2 ./mpi_gui
Greetings from process 0 of 2!
Greetings from process 1 of 2!
This starts both processes on the raspberry, both gui's are displayed on the hdmi monitor connected to pi. (not what I want)
2) I run on my laptop the command bellow:
sh-4.2$ mpiexec -n 2 ./mpi_gui
Greetings from process 0 of 2!
Greetings from process 1 of 2!
Both processes are running on my laptop, as expected, I got those 2 gui's on the laptop's display. (still, not what I want)
3) I run from my laptop the command below:
sh-4.2$ DISPLAY=:0 mpiexec -f machinefile -n 2 ./mpi_gui
pi@192.168.1.186's password:
mpi_gui: cannot connect to X server
It would be nice to start the laptop process with the gui displayed on the laptop's screen, and the raspberry pi process with the gui displayed on its hdmi screen. Though, there should be a way to tell mpiexec that each process should use it's own X server (or is this ssh job?)
DISPLAY=:0 mpiexec ...
cannot connect to X server