Run pi4 + monitor remotely from mac

I’m trying to compile and run an ofx sketch remotely from my mac on a Rpi4 connected to a monitor.

I have installed ‘X’ on my pi and from terminal, logged in to pi environment and ran this code

startx ./polygonExample – -s off

The sketch did not run.

Could someone clarify the steps required to run my sketch from ssh, THANKS

Documentation here

  • If you don’t want to run PI apps from the X desktop enviornment but want to use the GLFW window system ( or have a Raspberry Pi 4 which requires X ) you can run an OF app without the desktop. First make sure you have X installed with: sudo apt-get install xorg then launch your app with: startx ./polygonExample -- -s off. Your app will run with an X window but without the overhead of the desktop enivornment.
  • If you want to run an app headless you can use XVFB ( X Virtual Framebuffer ). First install XVFB with: sudo apt-get install xvfb Then run your app with: xvfb-run ./polygonExample &. You won’t see a window, but GL operations will be executed.
  • Finally for users who are looking for the old EGL style window support but with Raspberry Pi 4. This work in progress addon is very close to providing similar functionality.

Have fun! :slight_smile:

Hey,

Did you try running this same command with sudo?

Also, you might want to check the logs at /var/log/Xorg.0.log (the actual file might be named differently); in my case, there was a fb-turbo dependency missing.

I usually use like this remotely on linux:

DISPLAY=:0 ./bin/RC