piTFT and tkinter

EL Wire/Tape/Panels, LEDs, pixels and strips, LCDs and TFTs, etc products from Adafruit

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
attila_ivan
 
Posts: 3
Joined: Mon Jun 23, 2014 5:09 pm

piTFT and tkinter

Post by attila_ivan »

Hi there,

I have just finalized and developed a GUI under tkinter.
I am just wondering how to push and visualize the GUI on piTFT?
I do not want – if it is possible – to throw my software to trash, can you help me ASAP to tell me how I can visualize my tkinter on piTFT anyhow?
Do you have any idea?

User avatar
tdicola
 
Posts: 1074
Joined: Thu Oct 17, 2013 9:11 pm

Re: piTFT and tkinter

Post by tdicola »

Is it a python script that uses Tkinter to make a GUI? The PiTFT can run x-windows natively so you should be able to start X on the PiTFT, then run python and the Tkinter app. You'll want to be careful to make the UI usable on the small 320x240 pixel screen. Do you run into problems or errors when running your script?

attila_ivan
 
Posts: 3
Joined: Mon Jun 23, 2014 5:09 pm

Re: piTFT and tkinter

Post by attila_ivan »

I got the solution.
The problem was I did not started desktop automatically and tried to run my python program (uses tkinter to visualize a from/GUI) via SSH from my MS-Win.
First of all I had to set start with Desktop automatically (using "sudo raspi-config"). After that I was able to had run the program directly on piTFT via SSH, just the "sudo cp ~/.Xauthority ~root/" was needed first. The last trick was you have to put the "DISPLAY=0: " option before you run the "sudo python ..." command. The sudo was necessary because the sw uses GPIO, too.
Thanks anyway.

Locked
Please be positive and constructive with your questions and comments.

Return to “Glowy things (LCD, LED, TFT, EL) purchased at Adafruit”