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
  US Mobile, via T-Mobile, won't support Pinephone Pro - SOLVED, SIMPLY jovval 13 6,366 12-05-2024, 04:38 PM
Last Post: tllim
  Pinephone compatibility with Telstra, now that 3 G shutdown and 5 G available tracyanne 0 123 12-04-2024, 10:53 PM
Last Post: tracyanne
Question WhatsApp & Pinephone - What are the alternatives for collaborative comms? danimations 14 18,515 11-27-2024, 09:56 AM
Last Post: bsdbrulll
  eSIM on PinePhone just_a_q 8 5,039 11-05-2024, 11:10 AM
Last Post: zetabeta
  Want to buy second hand PinePhone 3G version rudi.timmermans 0 287 11-01-2024, 09:58 AM
Last Post: rudi.timmermans
  Can use PlayStation on Pinephone? willharper 6 5,900 10-30-2024, 08:07 AM
Last Post: biketool
  Ordered PinePhone till today have no info or confirmation about order hennadiyt 1 466 10-05-2024, 02:20 PM
Last Post: KC9UDX
  How can I record video on a Pinephone? kk22 18 7,700 07-22-2024, 05:18 PM
Last Post: baptx
  Pinephone not booting, always vibrating alexander12 8 7,179 07-19-2024, 07:50 PM
Last Post: Blackheart
  PinePhone Pro P. Siera 2 985 07-17-2024, 12:41 AM
Last Post: P. Siera

Forum Jump:


Users browsing this thread: 1 Guest(s)