0

I'm trying to run python3 tkinter script on Ubuntu Touch

I've created .desktop file in ~/.local/share/applications

.desktop file

[Desktop Entry]
Version=1.0
Type=Application
Terminal=true
Exec=/usr/bin/python3 /home/phablet/script.py
Icon=/usr/share/click/preinstalled/.click/users/@all/com.ubuntu.weather/app/weather-app.svg
Name=script
X-Ubuntu-Touch=true
X-Ubuntu-Single-Instance=true

When I click on it the "thinking" circle loops endlessly and the GUI doesn't shows on the screen.

When I'm trying to run the app from the terminal I get the following error:

_tkinter.TclError: no display name and no $DISPLAY environment variable

The script works fine on regular ubuntu.

What is the problem here? Thanks.

Kikto
  • 41
  • 4
  • Tk requires an X Windows display and it looks like Ubuntu Touch is using something else. On an X Windows display the DISPLAY environment variable is used to let client applications know which display to connect to. You have Mir and Wayland it seems and probably need an extra package to support X11 applications. – patthoyts Nov 15 '22 at 23:00

0 Answers0