I'm running an OpenFrameworks app on my Pi. It creates an EGL window for the graphics program. I have my Pi plugged into a TV with HDMI. This works, but I have to sit right in front of my TV which is uncomfortable. So, I want to be able to SSH into my PI from another computer, run my graphics program and have it display on the TV. Is there a way to create the EGL window/surface in the session that's outputting to the TV while having console output sent to my SSH session?

  • Wireless mouse and keyboard? Just taking a stab here - maybe you are trying to overcomplicate things. Remote Desktop maybe? ie VNC?
    – Piotr Kula
    Jan 17, 2016 at 22:32

3 Answers 3


You can do it.

The only catch is that you may need to start the program as root (via sudo) so that the program has permission to take control of resources (like the keyboard) you're not technically in front of when you SSH in and start it.


Have you tried this and found it doesn't work?

With pi3d the application gets an EGL display surface (using libbcm_host and libEGL) that is output over the HDMI but the normal terminal output goes to the ssh terminal. No need to sudo. (OpenFrameworks looks to do something similar here https://github.com/openframeworks/openFrameworks/blob/31d24eac22f817534c2a9c17d6fe3b6d01957a70/libs/openFrameworks/utils/ofConstants.h#L175 )

The keyboard input is from the ssh terminal (fortunately) but the mouse input is obtained directly from /dev/input/mice so responds to the one plugged into the pi.


This is not an straight answer but:

in my raspbian, when I do startx from SSH (using Xming in the windows machine) it starts too in the TV (I was surprised, but it happens) so I would say that somehow there is a way to do so.

Other option is to use straight Xming to forward your window to the host machine, if you wanna try that you will need to rely on a X11 window. Once you have an X11 window with your program running you can go with something like This

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.