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
  PinePhone - boot from microSD laserpyramid 7 637 04-25-2024, 05:56 AM
Last Post: aular
  pinephone virtual keyboard aular 4 368 04-10-2024, 03:45 PM
Last Post: aular
  PinePhone Doesn't Boot LED Doesn't Show Any Signs When Charging dorkydev 1 248 04-02-2024, 11:50 AM
Last Post: Kevin Kofler
  Are you using the Pinephone as your daily driver? jro 157 109,717 02-18-2024, 11:33 PM
Last Post: aular
  2020 PinePhone Manjaro CE EU for sale, name your price astrojuanlu 7 1,858 02-14-2024, 04:51 PM
Last Post: astrojuanlu
  pinephone is not bootble for the box. ijij 1 626 01-19-2024, 01:29 PM
Last Post: fxc
  Multiple issues with the Pinephone MTXP 12 2,412 12-28-2023, 07:55 AM
Last Post: MTXP
  pinephone repair shop shengchieh 0 512 12-26-2023, 02:42 PM
Last Post: shengchieh
  sudo nano file saving pinephone beta edition CharlesGnarley 4 1,739 12-22-2023, 03:44 PM
Last Post: Kevin Kofler
  Can't get Mobian on PinePhone to recognise USB-C docking bar duncan_bayne 9 7,008 12-04-2023, 02:14 AM
Last Post: Peter Gamma

Forum Jump:


Users browsing this thread: 1 Guest(s)