Closed jschueller closed 3 years ago
Any app in particular (so I know which one to try) or does it happen with all Qt applications?
I tried with kwrite and it seems to be ok aside from some quirky mouse input behavior.
You could try to debug by setting the WAYLAND_DEBUG=client env var when launching the app. This will show you the protocol communication from the apps point of view.
its a particular qt app, as I tried simpler qt examples
here's how I modified the containers to use it, to reproduce you can download it at https://we.tl/t-jrOIgtHgoE and put it at the root of the greenfield project:
diff --git a/app-endpoint-server/config.json5 b/app-endpoint-server/config.json5
index 1337b57..155598e 100644
--- a/app-endpoint-server/config.json5
+++ b/app-endpoint-server/config.json5
@@ -46,7 +46,7 @@
apps: {
'remote-gtk3-demo': {
// The full path of the executable binary. Can also be a symlink.
- bin: "/usr/bin/gtk3-demo",
+ bin: "/tmp/squashfs-root/AppRun",
// Arguments passed to the binary
args: [],
},
diff --git a/environments/local/containers/app-endpoint-server/Dockerfile b/environments/local/containers/app-endpoint-server/Dockerfile
index 7da0c3c..569abc9 100644
--- a/environments/local/containers/app-endpoint-server/Dockerfile
+++ b/environments/local/containers/app-endpoint-server/Dockerfile
@@ -32,6 +32,14 @@ COPY app-endpoint-server app-endpoint-server
# Enter application directory
WORKDIR /app/app-endpoint-server
RUN npm install && npm run generate && npm run build
+ADD persalys-10.0dev-x86_64.AppImage /tmp
+RUN chmod a+rx /tmp/persalys-10.0dev-x86_64.AppImage
+#RUN apt-get install -y libfuse2
+
+RUN cd /tmp && ./persalys-10.0dev-x86_64.AppImage --appimage-extract
+# RUN apt-get install -y libxt-dev
+# ENV QT_DEBUG_PLUGINS=1 WAYLAND_DEBUG=1 DEBUG=1
+ENV WAYLAND_DEBUG=client
# Start server
CMD npm run start
then if I click on "new study" button, then it stalls: I cannot click on "symbolic model" with WAYLAND_DEBUG=client I can see that it's still alive
I created a branch with the setup & using your app. It's based on the XWayland branch and seems to work fine-ish. Might be that the XWayland branch has fixes not present in current master. Can you confirm it works on this branch? https://github.com/udevbe/greenfield/commit/d8bf06fb3b42a8130e66df6ccd9f978b3cfaaf1d
If it works, I'll fix the input handling in qt (menu's don't seem to be clickable) & make new compositor-module release.
Make sure to:
cd compositor-module
yarn install
yarn build
yarn link
cd ..
cd compositor-demo
yarn install
yarn link compositor-module
yarn start
open a browser on localhost:8080
isnt it "yarn link greenfield-compositor" instead of "yarn link compositor-module" ? only the webshm app launches, with the others the screen stays gray as the command you gave do not involve docker, I have to populate /tmp/squashfs-root/AppRun in my host right ? did it work on your side ?
Confirm, only app works, also docker demo return 502 after accept cert.
Yes it worked on my end. Indeed there was a small error in my setup instructions previously.
From the branch 55-qt-app-freezes
from the root of the git repo:
pushd app-endpoint-server && yarn install && yarn generate && yarn build && GST_GL_WINDOW=gbm yarn start
pushd compositor-module && yarn install && yarn build && yarn link && popd && pushd compositor-demo && yarn install && yarn link greenfield-compositor && yarn start
I've tested it on a clean git clone on my end, can you confirm it works for you too?
it works now, thanks! you were right about the menus: they drop down but they're not clickable
@jschueller I'll make it a priority to fix them.
@upya4ko I'll see if I can improve the docker container demo workflow & update the https://greenfield-preview.web.app/ site with the qt fixes as the code running there is now almost a year old.
about "https://greenfield-preview.web.app/", is the code for this site available ? my idea was to customize it and provide use it through a docker image like the demo does
@jschueller you can find it here: https://github.com/udevbe/greenfield-webshell
thanks a lot
@Zubnix i try get working "wayland of Xwayland" app in browser on top of docker, i try demo-site https://greenfield-preview.web.app/ and try run GTK3 demo to get error
Remote GTK3 Demo failed to launch. Remote connection failed.
Ok, i try run docker demo, get 502 error, then try make my own docker demo image.
For now i stuck on
error: XDG_RUNTIME_DIR not set in the environment
I think it need some X11 server part.
WebGL and WebSHM work fine.
I think be a good for starters make simple docker demo "How to launch xterm/xeyes in browser" to help understand how greenfield may be implemented in infrastructure.
Sorry if i wrong understand propose of greenfield.
@jschueller I updated master & the test branch with your app. Menus should work now. Can you confirm?
yes, everything is ok, many thanks!
Ok great to hear!
@upya4ko I've moved your questions to a separate topic
Hello,
I'm trying to run a qt app through greenfield instead of the demo gtk app unfortunately it seems to freeze after a few actions. As it runs fine via weston it seems to indicate a problem with greenfield.
However i dont know how I could debug this. I tried to set the DEBUG env var in the app-endpoint-server container with no success.