Skip to main content
6 votes

Launch a GUI Tkinter program on boot

From Sparkfun website: The three methods covered in this tutorial are: rc.local - Likely the easiest and simplest way to get your program to run on boot. The downside is that tasks started with rc....
Ephemeral's user avatar
  • 2,157
5 votes
Accepted

RASPBERRY PI Error Python GUI : “no display name and no $DISPLAY environment variable”

this error usually happens when you access the RPI via SSH, you could run: export DISPLAY=0:0 or add it to your bashrc if you want it to be perminantly excuted on every therminal run and ssh ...
aa-samad's user avatar
  • 166
5 votes

No module named 'ImageTk'

I've just checked on my own pi and installing python-pillow does not install the extra libraries that I believe are needed (same goes for python-pil if you are using that one). I think you need to ...
flynnstone's user avatar
4 votes
Accepted

Is there a python picam gui out there?

Yes, there are various GUI tools that can control the Pi Camera without having to mess with the code yourself. One such example is PiCameraApp by Billwilliams1952 (available on GitHub). It is ...
Aurora0001's user avatar
  • 6,328
4 votes
Accepted

Hiding boot screen for kiosk usage

I've found the solution. If you want to remove the 4 raspberry logos on startup: - Open the file /boot/cmdline.txt. - Add a space and logo.nologo to the end. If anybody wants to remove the Pixel ...
Enis D.'s user avatar
  • 81
4 votes
Accepted

Start python script on pi through putty so it still runs after closing putty

Use the "nohup" command to start the script and it will continue running after you disconnect. For example, if your script is my_scripy.py you would start it with: nohup python3 my_script.py & ...
jwh20's user avatar
  • 479
3 votes

No module named '_tkinter' on python3 in Raspbian

In the world of Raspbian and for reasons that elude me, from tkinter import * works in python3 but not in python2 and from Tkinter import * works in python2 but not in python3. (note the capital “...
bashBedlam's user avatar
3 votes
Accepted

How to run a GUI Interface on a Remote Machine

My understanding, you have a script/program that collects data and displays this data on the screen. You would like to have the display on a desktop PC, but the data collection code executing on ...
crasic's user avatar
  • 3,003
3 votes

How to run a GUI Interface on a Remote Machine

Use ssh with X-Forwarding When you access raspberrypi from a Linux-machine with a XServer (as Ubuntu does) you have the possibility to use ssh and tell it use X-Forwarding like this: ssh -X pi@192....
MadMike's user avatar
  • 593
2 votes

I want to toggle a pushbutton and display it on tkinter GUI

You could use a separate loop that checks the GPIO state. Since it would block the main program from running root.mainloop() you have to create a thread that runs parallel to it and controls the label....
Domme's user avatar
  • 375
2 votes

tkinter on Raspberry Pi; Raspbian/Jessie Python 3.4

I had this same issue and realized I was using the command python when instead I should be using this command python3 If you use 2.7, import Tkinter # capital T if you use 3.4, import tkinter ...
Cody_Morton's user avatar
2 votes
Accepted

tkinter.TclError: couldn't connect to display

If you are connecting to a remote host via ssh and would like the graphical interface to show on your local display, you need to: Have Xwindows running on the local host. Enable X11Forwarding in ...
RubberStamp's user avatar
  • 1,409
2 votes

Virtual on-screen keyboard for raspberry pi touch screen

There're a few different keyboard solutions. Two of the most popular are matchbox-keyboard and florence. For matchbox-keyboard, they have a library to interact with auto-hide and auto-show. florence ...
Archonic's user avatar
  • 183
2 votes

No module named 'ImageTk'

I am currently using the raspberry pi and I realized that the latest version of python that it uses is python 3 or 3.5, so if you don't download ImageTk for python 3 or higher, it will not work. you ...
Ryan Gr's user avatar
  • 21
2 votes

Attribute and Type Error using Button class in Tkinter/GPIO Zero combination

Milliways and Dirk are correct, import* was the problem. I should have realized that both GPIO Zero and Tkinter have a Button class, so one was overwriting the other and causing the error. Thank you ...
Clueless_User's user avatar
2 votes

RASPBERRY PI Error Python GUI : “no display name and no $DISPLAY environment variable”

I've come up with a solution! import Tkinter import sys import os # check if if os.environ.get('DISPLAY','') == '': print('no display found. Using :0.0') os.environ.__setitem__('DISPLAY', ':...
Brian Lee's user avatar
2 votes

Help launching Tkinter on boot Pi 3

You wrote: when I run echo $DISPLAY I get DISPLAY:0.0 This is wrong. You must only get the environment value: rpi ~$ export DISPLAY=:0.0 rpi ~$ echo $DISPLAY :0.0 rpi ~$ export DISPLAY=DISPLAY:0.0 ...
Ingo's user avatar
  • 42.2k
2 votes

Raspberry Pi official Display

The simplest GUI is guizero. To install: pip3 install guizero Simple example: from guizero import App app = App(title="Hello world") app.display() https://lawsie.github.io/guizero/start/ ...
CoderMike's user avatar
  • 6,997
1 vote

a python GUI application to display some measured value (with Raspberry Pi)

Don't use while True in a tkinter program. Instead move the taking a measurement code into a function and drop the time.sleep call. Then use the tkinter after method to schedule a call to your ...
patthoyts's user avatar
  • 501
1 vote

Launch a GUI Tkinter program on boot

You can run a tkinter script with just a window manager and XORG, no desktop needed: Make sure XORG and openbox are installed. Create the following file in the directory with your tkinter script (...
Patrick Cook's user avatar
  • 6,365
1 vote

grab_set issue with tkinter toplevel window

Use wait_visibility() before grab_set().
Alexey's user avatar
  • 11
1 vote

Opening a new form

I may not know why it does what it does, but I found a work around. I just hid the button on the form and when the correct keypad button is pressed, I call the button.invoke(). Works every time now.
mScientist's user avatar
1 vote

3.5" touchscreen, tkinter output only?

from tkinter import * window = Tk() window.title("TouchScreen Window") window.geometry('800x600') window.mainloop()
MisterMike's user avatar
1 vote

Tkinter Push Button with Virtual Buttons

Tk like all windowing systems needs to process events to work properly. This is done by setting up all your widgets and callbacks and then calling the mainloop function to start handling events. So ...
patthoyts's user avatar
  • 501
1 vote

Automatic shortcut execution on boot

Put the command line from your .desktop file into /home/pi/.config/lxsession/LXDE-pi/autostart or /etc/xdg/lxsession/LXDE/autostart, whichever you use on your system. /home/pi/.config./autostart ...
Dmitry Grigoryev's user avatar
1 vote

Automatic shortcut execution on boot

From Raspberry Pi documentation: Edit file /etc/rc.local sudo nano /etc/rc.local Add your command bellow the comment, but leave the line exit 0 at the end of file. #!/bin/sh -e # # rc.local # # ...
Koxo's user avatar
  • 151
1 vote

Preventing user from exiting Tkinter GUI program on Raspbian

If you need to run a single application, you can lock the user in it by not starting any window manager at all: you'll get a single window occupying the entire screen with no "desktop" controls ...
Dmitry Grigoryev's user avatar
1 vote
Accepted

How to make a non-blocking delay on Tkinter?

To 'debounce' a button in tkinter your main script must be continuing to run the root.mainloop loop (as opposed to being stuck in a function call). To do that you can call button functions in a new ...
Matt's user avatar
  • 446
1 vote

Start Python script with image display (Start Python Skript mit Bilderanzeige)

This seems to be a problem with the GUI isn't initialized when the script starts. Try to start it with systemd with dependency After=graphical.target: rpi ~$ sudo systemctl --force --full edit ...
Ingo's user avatar
  • 42.2k

Only top scored, non community-wiki answers of a minimum length are eligible