PinePhone. How to run Python/Tkinter app?
#1
Photo 
Hello everyone

I have a problem.

A two years ago I created an application for Raspberry Pi 3 in Python and Tkinter.
Recently I bought a PinePhone64 and I would like to transfer this application to this device. I installed Mobian with Phosh there.

After researching the subject, it turned out that the RPi has an X11 display server, and the PP64 has a wayland.

Is there any possibility to run my application on PP64 without rebuilding the GUI?
How to do it?

I tried to install X11 server.

Code:
sudo apt install xauth xorg


later

Code:
sudo startx


Server starts, but the interface on the device changes to this:

[Image: 008946351-.html#1]
https://zdjecianaallegro.pl/gallery/008946351-.html#1

The touch does not work, the keyboard cannot be brought up.
I would like my application to appear in the original interface.

[Image: 008946351-2.html#2]
https://zdjecianaallegro.pl/gallery/008946351-2.html#2

I am a beginner in Mobian & Linux

Thank you in advance for your help
  Reply
#2
Running a standalone X11 session is a bad idea on the PinePhone. Phosh does not support it (and neither does Plasma Mobile). There is SXMO which supports X11, but since you write you are a beginner to GNU/Linux, I doubt you will want to use that (and I also think it is not supported by Mobian).

Instead, you will want to use XWayland (apt install xwayland) in the Wayland session. (You should not have to do anything beyond installing the package. It should get autostarted if it is installed.)
  Reply
#3
(08-23-2023, 05:09 PM)Kevin Kofler Wrote: Running a standalone X11 session is a bad idea on the PinePhone. Phosh does not support it (and neither does Plasma Mobile). There is SXMO which supports X11, but since you write you are a beginner to GNU/Linux, I doubt you will want to use that (and I also think it is not supported by Mobian).

Instead, you will want to use XWayland (apt install xwayland) in the Wayland session. (You should not have to do anything beyond installing the package. It should get autostarted if it is installed.)

I did

Code:
sudo apt update
sudo apt upgrade
sudo apt install xwayland

Reading package lists... Done

Building dependency tree... Done
Reading state information... Done
xwayland is already the newest version (2:23.2.0-1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

How can I now use XWayland to run a python program?
  Reply
#4
Thumbs Up 
It worked!!!


Code:
DISPLAY=:1 python3 app.py

So easy...
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How can I record video on a Pinephone? kk22 23 18,687 03-25-2026, 12:55 PM
Last Post: baptx
  Pinephone visibly losing power while plugged in Hiraghm 8 5,760 03-09-2026, 07:51 PM
Last Post: Tia Vaughan
  pinephone-support package not upgradable on Mobian fhireman 5 6,204 02-28-2026, 05:49 PM
Last Post: baptx
  beep - playing PCM samples on PinePhone? WhiteHexagon 0 608 12-04-2025, 08:07 AM
Last Post: WhiteHexagon
Star Selling my Pinephone Pro Explorer Edition zheyon 2 3,636 12-01-2025, 10:25 AM
Last Post: Kevin Kofler
  PinePhone sensors - Gyroscope power WhiteHexagon 3 1,072 11-30-2025, 08:07 AM
Last Post: WhiteHexagon
  Light Sensor / Proximity Sensor on PinePhone? WhiteHexagon 1 874 11-18-2025, 03:07 PM
Last Post: WhiteHexagon
  Pinephone boot. Richy_T 8 5,584 10-21-2025, 12:12 PM
Last Post: Richy_T
  Does PinePhone support long-term battery health optimization? roseblack 5 2,179 10-06-2025, 09:05 PM
Last Post: Kevin Kofler
  iso pinephone for sale (USA) elwoodb25 0 4,228 09-24-2025, 09:25 PM
Last Post: elwoodb25

Forum Jump:


Users browsing this thread: 1 Guest(s)