Using xwayland for a python app
saiftyfirst opened this issue · 2 comments
saiftyfirst commented
Hi guys,
I am trying to modify your example to make my python app work in a similar way.
Here is my yaml file (I basically kept it the same except the parts with the actual app)
name: tk-demo
version: '0.1'
summary: Demo of using tkinter for snappy
description: |
PyGame bouncing ball on a snappy package
base: core18
confinement: devmode
layout:
/usr/share/X11:
bind: $SNAP/usr/share/X11
/usr/share/tcltk:
bind: $SNAP/usr/share/tcltk
/usr/lib/tcltk:
bind: $SNAP/usr/lib/tcltk
parts:
xwayland-kiosk-helper:
plugin: cmake
source: https://github.com/MirServer/xwayland-kiosk-helper.git
build-packages: [ build-essential ]
stage-packages: [ xwayland, i3, libegl1-mesa, libgl1-mesa-glx ]
pygame-demo:
plugin: python
python-version: python3
source: .
stage-packages:
- python3-tk
- mesa-utils
environment:
XWAYLAND_FULLSCREEN_WINDOW_HINT: title="tk"
apps:
pygame-demo:
command: xwayland-kiosk-launch bin/tk_demo
plugs:
- wayland
However, when I do:
miral-kiosk&
sudo snap install --dangerous ./tk-demo_0.1_amd64.snap --devmode
snap run tk-demo
I get the following error:
Error: Unable to find a valid Wayland socket in /run/user/0
Is a Wayland server running?
Your example works perfectly fine.
Could you possibly give me a pointer on where I might be getting it wrong ?
Many thanks
saiftyfirst commented
This is the tutorial I was following:
https://ubuntu.com/tutorials/x11-kiosk#4-first-pass-snapping-test-on-desktop
merlijn-sebrechts commented
Please ask such questions on the forum, there are a bunch of really cool and smart people there who can help you further! https://forum.snapcraft.io/