helfrichmichael / cura-novnc

Provides an instance of Cura via noVNC in your favorite web browser!
13 stars 8 forks source link

No "open file" dialogue #4

Closed RealCommerzpunk closed 1 year ago

RealCommerzpunk commented 2 years ago

Good day, after updating the container to and having Cura 5 inside, there is an issue with openin files. When I click "open" no windows opens to choose a file. The only workarrond I found is, to rename my .stl files to one from the "recent" list, it will open then from picking it there.

Would you please investigate?

helfrichmichael commented 2 years ago

Hi @RealCommerzpunk ,

This is likely due to https://github.com/Ultimaker/Cura/issues/12266. I tried a few things locally to no avail so we might have to follow along on the upstream bug.

RealCommerzpunk commented 2 years ago

Thank you for investigating! I now just hope for a quick solution by cura, because I cant use the common workarrond "drag and drop into cura" because its a docker, lol. ;)

helfrichmichael commented 2 years ago

That's no problem, actually!

Reduce the window size of Cura in the docker or minimize temporarily. Then you can right click the desktop and click "File Explorer" visiting /prints should take you to your GCODE and STLs.

Example screenshot image

Tamperold commented 2 years ago

Thanks first of all for the Docker image. But is there also another solution for exporting the G-code? Opening is quite simple via drag and drop. Thanks!

Ernold11 commented 2 years ago

Hi, could you try this WO:

sudo apt-get install xdg-desktop-portal-gtk
dbus-update-activation-environment --systemd DBUS_SESSION_BUS_ADDRESS DISPLAY XAUTHORITY

It should fix the problem of not showing the open file window.

RealCommerzpunk commented 2 years ago

I tried, but i cant run the commands. I tried 2 ways: The "console" window from the unraid docker menu and second, the "terminal" window in the running GUI. Both result with "sudo: not found".

Then I tried the command without "sudo". Inside the GUI it results with "E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied) E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?" From unraid "E: Unable to locate package xdg-desktop-portal-gtk"

So I cant help, what am I missing?

Ernold11 commented 2 years ago

@RealCommerzpunk

On host: sudo docker exec -it --user root <CONTAINER_NAME> /bin/bash

Then in container:

apt-get update
apt-get install xdg-desktop-portal-gtk dbus-x11 -y
service dbus start
export $(dbus-launch)
dbus-update-activation-environment --systemd DBUS_SESSION_BUS_ADDRESS DISPLAY XAUTHORITY

Next open web browser, right click -> select terminal and paste:

export $(dbus-launch)
dbus-update-activation-environment --systemd DBUS_SESSION_BUS_ADDRESS DISPLAY XAUTHORIT

And everything should working. cura

@helfrichmichael Do you think about adding this WO to your Dockerfile? It should resolve the problem until cura resolves it on their site.

Ernold11 commented 2 years ago

Unfortunately on the new container with Cura 5.1.1 fix is not working.

@update It is more complicated now. You need to do all that steps above but then run cura using command: LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libstdc++.so.6 /bin/sh -c /cura/squashfs-root/AppRun

I cannot find but in one of the open issue on cura was information to use: Ultimaker-Cura-5.1.1-linux-modern.AppImage for updated linux distros instead of normal version: Ultimaker-Cura-5.1.1-linux.AppImage That version should work.

helfrichmichael commented 1 year ago

Thanks to https://github.com/Ultimaker/Cura/issues/12266#issuecomment-1274861668 I think we have a viable fix. Testing now and if all is good, I'll push shortly.

helfrichmichael commented 1 year ago

Thanks for the patience!

https://github.com/helfrichmichael/cura-novnc/actions/runs/3238503566 is rolling out with the fix now. I'll mark this as resolved.