I want to create a program for my Pi which when powered up comes up as a Use Interface for a ventilation system. I don't want it to run within the current Raspbian UI but on it's own. I have configured a Pi with a 5 inch touch screen display.
I have looked at Tkinter but this seems to always want to run inside the Raspbian UI. Not sure I care what I write it in (python, C etc.).
Any recommendations please?
Thanks, Brian
- DougieLawson
- Posts: 40480
- Joined: Sun Jun 16, 2013 11:19 pm
- Location: A small cave in deepest darkest Basingstoke, UK
- Contact: Website Twitter
Re: GUI Question
TKinter with python is relatively simple.
Page 44 in https://www.raspberrypi.org/magpi-issues/MagPi29.pdf has a tutorial.
Page 44 in https://www.raspberrypi.org/magpi-issues/MagPi29.pdf has a tutorial.
Any language using left-hand whitespace for syntax is ridiculous
Any DMs sent on Twitter will be answered next month.
Fake doctors - are all on my foes list.
Any requirement to use a crystal ball or mind reading will result in me ignoring your question.
Any DMs sent on Twitter will be answered next month.
Fake doctors - are all on my foes list.
Any requirement to use a crystal ball or mind reading will result in me ignoring your question.
Re: GUI Question
Hi Dougie, yes it is, I have played with it but I cannot see a way for a created dialog to be the only display on a full screen.
The dialog/window will contain items/controls for the system and I don't want to see any of the Raspbian window widgets. Also we are susceptible to power cuts here so if the pi re-boots I want the Tkinter system to come back up and be running as normal.
Brian
The dialog/window will contain items/controls for the system and I don't want to see any of the Raspbian window widgets. Also we are susceptible to power cuts here so if the pi re-boots I want the Tkinter system to come back up and be running as normal.
Brian
- DougieLawson
- Posts: 40480
- Joined: Sun Jun 16, 2013 11:19 pm
- Location: A small cave in deepest darkest Basingstoke, UK
- Contact: Website Twitter
Re: GUI Question
You can make TKinter windows with no controls (so they run like a kiosk).
Lots of Stackoverflow examples for that https://www.google.co.uk/search?q=tkint ... w+controls
The other way to do a GUI is HTML/CSS/JavaScript and run that in a kiosk mode web browser (KWeb probably fits that best). If you serve that stuff from a small web server you can make a dynamic kiosk GUI.
Lots of Stackoverflow examples for that https://www.google.co.uk/search?q=tkint ... w+controls
The other way to do a GUI is HTML/CSS/JavaScript and run that in a kiosk mode web browser (KWeb probably fits that best). If you serve that stuff from a small web server you can make a dynamic kiosk GUI.
Any language using left-hand whitespace for syntax is ridiculous
Any DMs sent on Twitter will be answered next month.
Fake doctors - are all on my foes list.
Any requirement to use a crystal ball or mind reading will result in me ignoring your question.
Any DMs sent on Twitter will be answered next month.
Fake doctors - are all on my foes list.
Any requirement to use a crystal ball or mind reading will result in me ignoring your question.
Re: GUI Question
OK, that looks like what I want to do. I want to continue with a python based language if possible as I have lots do do controlling the Pi behind the front window.
Will experiment!!!
Thanks Dougie.
Will experiment!!!
Thanks Dougie.
Re: GUI Question
I am still a bit confused Dougie, I cannot see anything from the search link you gave me that allows Tkinter code to replace the Raspbian top level gui with mine? That is make a Tk inter developed window automatically be the top level window with stuff within it. I don't mind if the Raspbian top level has to loaded first then automatically start my Tk python code to overwrite it or just sit in to of it (all of it). (ho do I do that???).
Are then any simple examples around you can point me to?
Cheers, Brian
Are then any simple examples around you can point me to?
Cheers, Brian
Re: GUI Question
Here is an old thread discussing this very issue.
viewtopic.php?t=7709
Seems SDL is what you want, though they suggest using C or C++.
I believe PyGame uses SDL, so maybe you can use python after all.
viewtopic.php?t=7709
Seems SDL is what you want, though they suggest using C or C++.
I believe PyGame uses SDL, so maybe you can use python after all.
- DougieLawson
- Posts: 40480
- Joined: Sun Jun 16, 2013 11:19 pm
- Location: A small cave in deepest darkest Basingstoke, UK
- Contact: Website Twitter
Re: GUI Question
If you don't start the desktop, but start Xwindows with just a single application that'll give you what you want.
To experminent set-up Raspbian to login to a command prompt only (it's a Raspi-Config option). Then try a startx /home/pi/mygui.program.py command.
To experminent set-up Raspbian to login to a command prompt only (it's a Raspi-Config option). Then try a startx /home/pi/mygui.program.py command.
Any language using left-hand whitespace for syntax is ridiculous
Any DMs sent on Twitter will be answered next month.
Fake doctors - are all on my foes list.
Any requirement to use a crystal ball or mind reading will result in me ignoring your question.
Any DMs sent on Twitter will be answered next month.
Fake doctors - are all on my foes list.
Any requirement to use a crystal ball or mind reading will result in me ignoring your question.
Re: GUI Question
Thanks again Dougie, I have decided to go with the standard desktop with my GUI filling to space under the tool-bar. I now know how to automatically start a python program when the gui boots so I am getting there.
I found a link to a gui-builder called wxpython but not sure if it is supported on the pi, will look further.
Brian
I found a link to a gui-builder called wxpython but not sure if it is supported on the pi, will look further.
Brian