Closed PowerChaos closed 2 years ago
Does installing the Debian package using Alien work?
I tried using alien to create an rpm to install to Fedora 33, it worked except the buildspec includes /usr/bin and other already existing paths, which causes the installation to fail. This seems to be a common issue with alien that can be solved using rpmrebuild and removing these from the spec file.
After that it installed successfully and the stl-thumb command works. No thumbnails are generated in nautilus though, and there are corresponding entries in ~/.cache/thumbnails/fail/gnome-thumbnail-factory. I'm not sure were to continue debugging this though, so I'm just posting my findings here for now.
I tried to build master and I copied stl-thumb
to /usr/bin/
and stl-thumb.thumbnailer
to ~/.local/share/thumbnailers/
Running nautilus with RUST_BACKTRACE=1 G_MESSAGES_DEBUG=all nautilus
and trying to generate thumbnail it failed with:
(org.gnome.Nautilus:264534): GnomeDesktop-DEBUG: 18:10:26.629: About to launch script: bwrap --ro-bind /usr /usr --ro-bind /etc/ld.so.cache /etc/ld.so.cache --symlink /usr//bin /bin --symlink /usr//lib64 /lib64 --symlink /usr//lib /lib --symlink /usr//sbin /sbin --setenv GST_REGISTRY_1_0 /home/janinko/.cache/gnome-desktop-thumbnailer/gstreamer-1.0/gstreamer-1.0.registry --bind /home/janinko/.cache/gnome-desktop-thumbnailer/gstreamer-1.0 /home/janinko/.cache/gnome-desktop-thumbnailer/gstreamer-1.0 --ro-bind-try /etc/alternatives /etc/alternatives --proc /proc --dev /dev --chdir / --setenv GIO_USE_VFS local --unshare-all --die-with-parent --setenv G_MESSAGES_DEBUG all --bind /tmp/gnome-desktop-thumbnailer-TR0RC1 /tmp --ro-bind /tmp/c.stl /tmp/c.stl --seccomp 31 stl-thumb -f png -s 256 /tmp/c.stl /tmp/gnome-desktop-thumbnailer.png
(org.gnome.Nautilus:264534): GnomeDesktop-DEBUG: 18:10:26.877: Failed to launch script: thread 'main' panicked at 'Failed to initialize any backend! Wayland status: NoCompositorListening X11 status: XOpenDisplayFailed', /home/janinko/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.25.0/src/platform_impl/linux/mod.rs:612:9
stack backtrace:
0: rust_begin_unwind
1: std::panicking::begin_panic_fmt
2: winit::platform_impl::platform::EventLoop<T>::new_any_thread
at ./home/janinko/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.25.0/src/platform_impl/linux/mod.rs:612:9
3: <winit::event_loop::EventLoop<T> as winit::platform::unix::EventLoopExtUnix>::new_any_thread
at ./home/janinko/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.25.0/src/platform/unix.rs:157:17
4: stl_thumb::create_headless_display::{{closure}}
at ./mnt/data/apps/stl-thumb/src/lib.rs:104:32
5: std::panicking::try::do_call
at ./builddir/build/BUILD/rustc-1.56.1-src/library/std/src/panicking.rs:403:40
6: __rust_try
7: std::panicking::try
at ./builddir/build/BUILD/rustc-1.56.1-src/library/std/src/panicking.rs:367:19
8: std::panic::catch_unwind
at ./builddir/build/BUILD/rustc-1.56.1-src/library/std/src/panic.rs:129:14
9: stl_thumb::create_headless_display
at ./mnt/data/apps/stl-thumb/src/lib.rs:104:9
10: stl_thumb::render_to_image
at ./mnt/data/apps/stl-thumb/src/lib.rs:356:11
11: stl_thumb::render_to_file
at ./mnt/data/apps/stl-thumb/src/lib.rs:394:15
12: stl_thumb::main
at ./mnt/data/apps/stl-thumb/src/main.rs:40:25
13: core::ops::function::FnOnce::call_once
at ./builddir/build/BUILD/rustc-1.56.1-src/library/core/src/ops/function.rs:227:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
thread 'main' panicked at 'Failed to initialize any backend! Wayland status: NoCompositorListening X11 status: XOpenDisplayFailed', /home/janinko/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.25.0/src/platform_impl/linux/mod.rs:612:9
stack backtrace:
0: rust_begin_unwind
1: std::panicking::begin_panic_fmt
2: winit::platform_impl::platform::EventLoop<T>::new_any_thread
at ./home/janinko/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.25.0/src/platform_impl/linux/mod.rs:612:9
3: winit::platform_impl::platform::EventLoop<T>::new
at ./home/janinko/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.25.0/src/platform_impl/linux/mod.rs:567:9
4: winit::event_loop::EventLoop<T>::with_user_event
at ./home/janinko/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.25.0/src/event_loop.rs:134:25
5: winit::event_loop::EventLoop<()>::new
at ./home/janinko/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.25.0/src/event_loop.rs:120:9
6: stl_thumb::create_normal_display
at ./mnt/data/apps/stl-thumb/src/lib.rs:64:22
7: stl_thumb::render_to_image
at ./mnt/data/apps/stl-thumb/src/lib.rs:375:32
8: stl_thumb::render_to_file
at ./mnt/data/apps/stl-thumb/src/lib.rs:394:15
9: stl_thumb::main
at ./mnt/data/apps/stl-thumb/src/main.rs:40:25
10: core::ops::function::FnOnce::call_once
at ./builddir/build/BUILD/rustc-1.56.1-src/library/core/src/ops/function.rs:227:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
(org.gnome.Nautilus:264534): GnomeDesktop-DEBUG: 18:10:26.878: Thumbnail script ('stl-thumb -f png -s %s %i %o') failed for 'file:///tmp/c.stl': Proces potomka skončil s kódem 101
Yah the master branch is currently a little broken right now. That's why I haven't pushed out a new release yet. Try building from v0.4.0.
The tool is working correctly when I use it in CLI from the build directory. I think there will be some issue with the sandboxing.
Anyway I tried v0.4.0 with following error:
(org.gnome.Nautilus:416595): GnomeDesktop-DEBUG: 13:43:19.793: About to launch script: bwrap --ro-bind /usr /usr --ro-bind /etc/ld.so.cache /etc/ld.so.cache --symlink /usr//bin /bin --symlink /usr//lib64 /lib64 --symlink /usr//lib /lib --symlink /usr//sbin /sbin --setenv GST_REGISTRY_1_0 /home/janinko/.cache/gnome-desktop-thumbnailer/gstreamer-1.0/gstreamer-1.0.registry --bind /home/janinko/.cache/gnome-desktop-thumbnailer/gstreamer-1.0 /home/janinko/.cache/gnome-desktop-thumbnailer/gstreamer-1.0 --ro-bind-try /etc/alternatives /etc/alternatives --proc /proc --dev /dev --chdir / --setenv GIO_USE_VFS local --unshare-all --die-with-parent --setenv G_MESSAGES_DEBUG all --bind /tmp/gnome-desktop-thumbnailer-NTANC1 /tmp --ro-bind /tmp/d.stl /tmp/d.stl --seccomp 31 stl-thumb -f png -s 256 /tmp/d.stl /tmp/gnome-desktop-thumbnailer.png
(org.gnome.Nautilus:416595): GnomeDesktop-DEBUG: 13:43:19.979: Failed to launch script: thread 'main' panicked at 'Failed to initialize any backend!
Wayland status: NoCompositorListening
X11 status: XOpenDisplayFailed
', /home/janinko/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.17.2/src/platform/linux/mod.rs:439:9
stack backtrace:
0: std::panicking::begin_panic
at ./builddir/build/BUILD/rustc-1.56.1-src/library/std/src/panicking.rs:543:12
1: winit::platform::platform::EventsLoop::new
at ./home/janinko/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.17.2/src/platform/linux/mod.rs:439:9
2: winit::EventsLoop::new
at ./home/janinko/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.17.2/src/lib.rs:207:26
3: stl_thumb::create_normal_display
at ./mnt/data/apps/stl-thumb/src/lib.rs:53:23
4: stl_thumb::render_to_image
at ./mnt/data/apps/stl-thumb/src/lib.rs:285:32
5: stl_thumb::render_to_file
at ./mnt/data/apps/stl-thumb/src/lib.rs:297:15
6: stl_thumb::main
at ./mnt/data/apps/stl-thumb/src/main.rs:40:25
7: core::ops::function::FnOnce::call_once
at ./builddir/build/BUILD/rustc-1.56.1-src/library/core/src/ops/function.rs:227:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
(org.gnome.Nautilus:416595): GnomeDesktop-DEBUG: 13:43:19.980: Thumbnail script ('stl-thumb -f png -s %s %i %o') failed for 'file:///tmp/d.stl': Proces potomka skončil s kódem 101
May be worth trying again with v0.4.1. https://github.com/unlimitedbacon/stl-thumb/releases/tag/v0.4.1
Closing. Reopen this issue if it is still happening with v0.5.0.
hi, would it be possible to provide centos support ? i got a script that shows STL files in the browser , but i need this plugin to show thumbnails of the STL files
Thank you Greets from PowerChaos