b-init / ImagePaste

A simple Blender addon to grab images from your clipboard and paste as a reference image in viewport or onto the image editor.
GNU General Public License v3.0
246 stars 9 forks source link

BUG: ImagePaste doesn't work on linux on a flatpak installation of blender #35

Closed b-init closed 1 year ago

b-init commented 1 year ago

Describe the bug

libXmu.so.6 is inaccessible (or, not where it expects the file to be) when using blender as a flatpak. I can say for certain that it's flatpak being the issue because it works fine when installed through apt. I'm new to linux and flatpaks so I don't really understand what's going on, but from some research it seems the application (or flatpak?) is supposed to include the required libraries in the sandboxed directiory which the application can access. I've also tried allowing the perms --filesystem=host, --filesystem=home, and to the location of where libXmu.so.6 actually exists (/usr/lib/x86_64-linux-gnu/libXmu.so.6) but none of that seems to help.

Sorry if this is something not supposed to be fixed from the addon's side. I thought a discussion was necessary anyway.

Step to reproduce

  1. Install blender through flatpak on (presumably) any linux distribution
  2. Attempt to use any of Imagepaste's functions.

Relevant log output

`ImagePaste: Process failed (/home/binit/.var/app/org.blender.Blender/config/blender/3.3/scripts/addons/ImagePaste/imagepaste/clipboard/linux/bin/xclip: error while loading shared libraries: libXmu.so.6: cannot open shared object file: No such file or directory)`

Expected behavior

It should just work.

Platform

Linux

Platform version

Pop!_OS 22.04 LTS

Blender version

Other

thanhph111 commented 1 year ago

I can reproduce on my Ubuntu 20.04 so I think you're right, Flatpak build is the culprit. I found this issue and it might be what we're looking for: https://github.com/flatpak/flatpak/issues/2713. Unfortunately, I can't find a libXmu.so.6 on my distro so still cannot check if the workaround works.

In my experience, sandbox environment packages like Flatpaks or Snaps are not really stable, I always try to avoid using them for any application that requires performance and reliability. In fact, I only use Flatpaks for Discord and Spotify :smile:.

b-init commented 1 year ago

yeah I've been having way too many issues with flatpaks. Got blender's portable linux build running and everything's working perfectly.

Marking this issue wontfix for now. But still should look into a fix if it isn't much of a hassle later.