6

I am currently fiddling around with a RaspberryPi and a TFT hat. It is connected to the RPi GPIO pins. The TFT screen itself is working and I see the normal Linux console on it. I fetched a quick pygame example and ran it successfully using:

SDL_FBDEV=/dev/fb1 python3 myapp.py

But my setup is a bit fiddly, with the small PI and a separate keyboard attached to it. I would love to be able to ssh into the PI, do some experimentation and launch the application via the remote console.

However when I ssh into the PI and run the above command, it won't show anything as the graphics environment is not available in the ssh session. I tried running a tmux shell and attaching to that, but without success. Obviously using the DISPLAY variable won't work either as I'm not running X. I tried that anyway but it did not work.

The setup I imagine is having the PI sitting on the desk with the only cable attached to it being the power cable. Network would be done by WiFi. So I would have a small box on my desktop with a small TFT screen on it. Then I would like to connect to that box via ssh to deploy the application and run it in that ssh shell. When running this I would like the application to show up on the small TFT screen on the PI.

The ssh client varies. If I use my laptop to connect that would be OpenSSH in likely the latest version of whatever is current in Arch Linux, and when using another PC that would be the OpenSSH client from Cygwin

Is there any way to start the application remotely such that it shows up on a selected framebuffer device?

exhuma
  • 222
  • 1
    One possible setup is using a serial cable. – Rui F Ribeiro Dec 11 '17 at 20:31
  • 1
    Maybe this: https://github.com/ponty/framebuffer-vncserver ? (found via "remote framebuffer" online search). – Tomáš Pospíšek Dec 11 '17 at 22:15
  • @TomášPospíšek this looks promising. I'll give it a try tonight. – exhuma Dec 12 '17 at 11:53
  • @TomášPospíšek this does not quite work. It only exposed the framebuffer via VNC, but I still cannot launch a framebuffer application via SSH – exhuma Dec 12 '17 at 19:08
  • I'd imagine: 1. setup framebuffer -> VNC, 2. setup VNC to where you sit, 3. log in via ssh, start the application that displays onto that framebuffer. Which step is unworkable? – Tomáš Pospíšek Dec 15 '17 at 22:36
  • The problem happens after SSHing into the box. I get an error that the graphical system is not initialised. It looks I don't have access to graphics when SSHing in. – exhuma Dec 16 '17 at 15:27
  • Can you edit your question to clarify: Are you trying to display on a display that is attached to the PI, or to the device that has sshed to the pi? If the 2nd what is this device? What software do you use to ssh (your ssh client)? – ctrl-alt-delor Jul 30 '19 at 18:53
  • @ctrl-alt-delor Added some clarification – exhuma Jul 31 '19 at 09:24
  • So what is the TFT connected to? – ctrl-alt-delor Jul 31 '19 at 09:41
  • It's connected to the GPIO pins. I've added a link to the hat in the question. – exhuma Aug 01 '19 at 08:44
  • The problem may be with VT switching. Put the Linux console on another terminal to check that. You may also try to connect a keyboard to the Pi and do Ctrl+Alt+F1..F10, or use the chvt tool through ssh. – Janka Aug 01 '19 at 09:00

0 Answers0