Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ywallet doesnt work via remote ssh or x2go #43

Closed
michaelni opened this issue Dec 12, 2022 · 14 comments
Closed

Ywallet doesnt work via remote ssh or x2go #43

michaelni opened this issue Dec 12, 2022 · 14 comments

Comments

@michaelni
Copy link

On a x86-64 ubuntu LTS with latest flatpak (Flatpak 1.15.1) through a remote ssh (tried both -X and -Y)
running "flatpak run app.ywallet.Ywallet" shows

flutter: NOTES 0
flutter: TXS 0
flutter: NOTES 0
flutter: TXS 0

But the ywallet window never shows up. The ywallet process happily runs though it seems

If instead i run it through x2go there are a few extra warnings but otherwise again nothing shows up.

If I run "flatpak run app.ywallet.Ywallet" locally on the same machiene it works fine and shows up.
Somehow it feels as if the app window isnt sent to the right display, but maybe its something else.

@hhanh00
Copy link
Owner

hhanh00 commented Dec 12, 2022

Are you able to run other apps remotely?

@michaelni
Copy link
Author

michaelni commented Dec 12, 2022

Are you able to run other apps remotely?

yes, xterm, kwrite work perfectly fine through ssh, gimp works but is too slow though ssh

through x2go xterm, kwrite, gimp work fine
snap based firefox needs 'DBUS_SESSION_BUS_ADDRESS=' but that doesnt help ywallet.
there seems to be a problem on that ubuntu with libreoffice, i need to investigate that. libreoffice works perfectly fine on a older ubuntu via ssh

@michaelni
Copy link
Author

michaelni commented Dec 12, 2022

there seems to be a problem on that ubuntu with libreoffice, i need to investigate that. libreoffice works perfectly fine on a older ubuntu via ssh

libreoffice --display "$DISPLAY"
works fine in both ssh and x2go. little slow in ssh.

@hhanh00
Copy link
Owner

hhanh00 commented Dec 12, 2022

Flutter uses OpenGL. It won't work over an ssh session, unfortunately.

@michaelni
Copy link
Author

Flutter uses OpenGL. It won't work over an ssh session, unfortunately.

glxgears works over ssh
now i do not know why one would use opengl for a wallet but iam sure there is a good reason. If hardware opengl is unavailable i would expect it to use software emulation. So iam not sure why that would be a reason for this not to work but quite possibly iam missing some issues
thx

@hhanh00
Copy link
Owner

hhanh00 commented Dec 12, 2022

It's flutter that uses OpenGL. You'd have the same issue with the demo app. You may be able to get it to work with VirtualGL.

Another way is to use VNC

@michaelni
Copy link
Author

It's flutter that uses OpenGL. You'd have the same issue with the demo app.

Tried snap install flutter-calculator
I presume thats a "demo" app, was the first easy one to install i found
DISABLE_WAYLAND=1 DBUS_SESSION_BUS_ADDRESS= XAUTHORITY="/home/user/.Xauthority" flutter-calculator
works over ssh
DISABLE_WAYLAND=1 DBUS_SESSION_BUS_ADDRESS= flutter-calculator
works over x2go

@hhanh00
Copy link
Owner

hhanh00 commented Dec 12, 2022

[hanh@minipc projects]$ flutter create demo
Creating project demo...
Running "flutter pub get" in demo...                             1,045ms
Wrote 127 files.

All done!
In order to run your application, type:

  $ cd demo
  $ flutter run

Your application code is in demo/lib/main.dart.

[hanh@minipc projects]$ cd demo
[hanh@minipc demo]$ flutter run
Launching lib/main.dart on Linux in debug mode...
Building Linux application...                                           
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
[ERROR:flutter/shell/gpu/gpu_surface_gl_delegate.cc(96)] Could not create a valid GL interface.
[ERROR:flutter/shell/platform/embedder/embedder_surface_gl.cc(95)] Internal error: Resource context available but could not create a compatible Skia context.
[ERROR:flutter/shell/gpu/gpu_surface_gl_delegate.cc(96)] Could not create a valid GL interface.
[ERROR:flutter/shell/gpu/gpu_surface_gl_skia.cc(54)] Failed to set up Skia Gr context.
[ERROR:flutter/shell/common/platform_view.cc(76)] Failed to create platform view rendering surface
No provider of glGenVertexArrays found.  Requires one of:
    Desktop OpenGL 3.0
    GL_ARB_vertex_array_object
    OpenGL ES 3.0
    GL_APPLE_vertex_array_object
    GL_OES_vertex_array_object
Lost connection to device.

This way fails too:

[hanh@minipc bundle]$ DISABLE_WAYLAND=1 DBUS_SESSION_BUS_ADDRESS= XAUTHORITY="/home/hanh/.Xauthority" ./demo
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
[ERROR:flutter/shell/gpu/gpu_surface_gl_delegate.cc(96)] Could not create a valid GL interface.
[ERROR:flutter/shell/platform/embedder/embedder_surface_gl.cc(95)] Internal error: Resource context available but could not create a compatible Skia context.
[ERROR:flutter/shell/gpu/gpu_surface_gl_delegate.cc(96)] Could not create a valid GL interface.
[ERROR:flutter/shell/gpu/gpu_surface_gl_skia.cc(54)] Failed to set up Skia Gr context.
[ERROR:flutter/shell/common/platform_view.cc(76)] Failed to create platform view rendering surface
No provider of glGenVertexArrays found.  Requires one of:
    Desktop OpenGL 3.0
    GL_ARB_vertex_array_object
    OpenGL ES 3.0
    GL_APPLE_vertex_array_object
    GL_OES_vertex_array_object
Aborted (core dumped)

xeyes and glxgears work.

OpenGL support is pretty bad on Mac. What OS is your client using?

@michaelni
Copy link
Author

I tried a few times but i get no errors, but also no windows showing up. Its hard to say what the problem is if there is no error

#snap install flutter --classic
flutter 0+git.ccbc698 from Flutter Team** installed
exit

flutter create demo
...
cd demo

flutter  --suppress-analytics  run
Launching lib/main.dart on Linux in debug mode...
Building Linux application...                                           
Syncing files to device Linux...                                   287ms

Flutter run key commands.
r Hot reload. 🔥🔥🔥
R Hot restart.
h List all available interactive commands.
d Detach (terminate "flutter run" but leave application running).
c Clear the screen
q Quit (terminate the application on the device).

💪 Running with sound null safety 💪

An Observatory debugger and profiler on Linux is available at: http://127.0.0.1:34731/U9ljdkHnXK4=/
The Flutter DevTools debugger and profiler on Linux is available at: http://127.0.0.1:9101?uri=http://127.0.0.1:34731/U9ljdkHnXK4=/

@michaelni
Copy link
Author

michaelni commented Dec 12, 2022

OpenGL support is pretty bad on Mac. What OS is your client using?

both sides of the ssh connection are ubuntu LTS, one is 22.04 teh other is a 20.04

@hhanh00
Copy link
Owner

hhanh00 commented Dec 13, 2022

It doesn't seem to be related to ywallet in any case. You should get better help If you posted this issue on the flutter GitHub.

@michaelni
Copy link
Author

I got the demo app working through ssh (not x2go yet) what i did was shut down the main wayland server so flutter has no option to pick the wrong server. and then a
flutter --suppress-analytics run
works with and without --enable-software-rendering
Its a bit slow but the window reacts to clicks
with ywallet OTOH
flatpak run app.ywallet.Ywallet
now says
(ywallet:2): Gtk-WARNING **: 18:01:01.329: cannot open display:

Iam sure theres some way to make it use the right display but i dont understand why this is so complex both ssh and x2go setup the environment with all variables pointing to the right display and authentication, or at least i assume they do as other apps work.

@hhanh00
Copy link
Owner

hhanh00 commented Dec 14, 2022

There is also the flatpak sandbox. Maybe this causes problems too. Unfortunately, I don't have a second Linux machine for testing.

@hhanh00
Copy link
Owner

hhanh00 commented Dec 19, 2022

The AppImage works for me with ssh -X -Y localhost

@hhanh00 hhanh00 closed this as completed Dec 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants