I recently install the PiTFT on my Pi. Works great for X and I am able to have it work as a boot console. My question is how to I force an application that runs from the terminal e.g. mame, mame4all etc to use /dev/fb1 instead of /dev/fb0? Or must the applications support Frame Buffer?

I tried

FRAMEBUFFER=/dev/fb1 appname

1 Answer 1


If the "application(s) that run(s) from the terminal" are X windows clients:

Assuming you haven't done magic to make one continuos display, the target screen is set via the DISPLAY environment var (or sometimes via a -d, -display or --display command line arg) with a :0.0 for the first screen and :0.1 for the next, etc. I.E.

xterm -display localhost:0.1

For that to work thought, you need to have X running on both of the screens, and thats beyond the research I've done for the Pi and the PiTFT (thought, it might be as simple as running two startx's, one on each frame buffer)

BTW: When I look at the adafruit FAQ on the PiTFT it talks about fb0 being the HDMI port (and in the earlier setup fb1 port is what is configured for the PiTFT). Are you saying that the apps currently display on the HDMI and your trying to move them to the PiTFT or are you saying you mapped the PiTFT to fb0 (if so I could imagine there might be some problems there too)?

  • Thanks for the response. To clarify; the apps currently display on the HDMI and I am trying to move them to the PiTFT. Programs like X and mplayer2 support Frame Buffer and can be viewed on the PiTFT.
    – PhillyNJ
    Apr 1, 2014 at 19:27

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.