Realthunder's Link branch Snap packages

This subforum is specifically to discuss packaging issues on different platforms (windows, mac, linux), and using different packaging systems (conda, etc...)
ToniTen
Posts: 165
Joined: Fri Sep 04, 2020 10:11 am

Realthunder's Link branch Snap packages

Post by ToniTen »

I just realized that there's a Snap for RealThunder's LinkDaily branch of FreeCAD here. I was surprised since I saw no mention of it in either this forum, or on RT's github documentation. Is this a real thing, or was it created by a 3rd party pretending to be RT?

I mean, I've got nothing against appimages, but I like the level of automatic system integration that Snaps and Flatpacks bring.
Last edited by Kunda1 on Tue Jan 25, 2022 3:09 pm, edited 1 time in total.
Reason: split off from the enormous Assembly3 thread in to it's own thread
User avatar
bambuko
Veteran
Posts: 1549
Joined: Thu Oct 24, 2019 12:53 pm
Location: UK, England, North Devon

Re: Assembly3 preview

Post by bambuko »

ToniTen wrote: Mon Jan 24, 2022 11:34 am ... Is this a real thing, or was it created by a 3rd party pretending to be RT?...
Don't know, but good find!
https://github.com/realthunder/FreeCAD_ ... 1112574529

later edit:
it's official
ToniTen
Posts: 165
Joined: Fri Sep 04, 2020 10:11 am

Re: Assembly3 preview

Post by ToniTen »

bambuko wrote: Mon Jan 24, 2022 12:19 pm it's official
And there was much rejoicing!

I've tested it, and well, it might be me, but it doesn't seem to be working properly yet. I can't get it to access local files (the open/save file dialogs do no appear). Snaps are tricky in that they are sandboxed and need to be given explicit access to any paths in the file system that they're supposed to access (and that's the limit of my knowledge), so it might be that it's not yet set up correctly to access /home. I googled and reached this page, and tried

Code: Select all

snap connect freecad-realthunder:home :home
but it still does not open the open file dialog
Checking terminal output, I see this

Code: Select all

FreeCAD 0.20, Libs: 2022.120R14555 (Git shallow)
Adding snap-specific PYTHONPATH to sys.path: /home/axis/snap/freecad-realthunder/common/.local/lib/python3.8/site-packages:/snap/freecad-realthunder/1/lib/python3.8/site-packages:/snap/freecad-realthunder/1/usr/lib/python3/dist-packages
Fontconfig warning: "/etc/fonts/conf.avail/53-monospace-lcd-filter.conf", line 10: Having multiple values in <test> isn't supported and may not work as expected
connect failed: No such file or directory
which might or might not be relevant.
I've reached the limits of my knowledge on the black magic required to make snaps work.

BTW, I'm on ubuntu 18.04, snapd 2.53.4.
User avatar
Kunda1
Veteran
Posts: 12696
Joined: Thu Jan 05, 2017 9:03 pm

Re: Assembly3 preview

Post by Kunda1 »

Note: connect failed: No such file or directory is unrelated. It's a separate issue.
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
User avatar
ppd
Posts: 105
Joined: Tue Feb 26, 2019 12:01 pm
Location: Munich, Germany

Re: Assembly3 preview

Post by ppd »

ToniTen wrote: Mon Jan 24, 2022 3:37 pm
but it still does not open the open file dialog

BTW, I'm on ubuntu 18.04, snapd 2.53.4.
Do you have xdg-desktop-portal-gtk installed (if it's Ubuntu with Gnome)? Is it running? Qt in the snap calls out to the desktop portal to show the appropriate file dialog. If it's not present, Qt does unfortunately not fall back to its native file dialog.
Try FreeCAD from the Snap Store: Stable releases (in latest/stable) & daily builds (in latest/edge). Supports installing additional python packages via pip!
Image
ToniTen
Posts: 165
Joined: Fri Sep 04, 2020 10:11 am

Re: Assembly3 preview

Post by ToniTen »

ppd wrote: Mon Jan 24, 2022 8:22 pm Do you have xdg-desktop-portal-gtk installed (if it's Ubuntu with Gnome)? Is it running? Qt in the snap calls out to the desktop portal to show the appropriate file dialog. If it's not present, Qt does unfortunately not fall back to its native file dialog.
I do have other snaps (Inkscape notably), and they work, but I don't have this package. After installing it, it works! Thanks a lot!
User avatar
ppd
Posts: 105
Joined: Tue Feb 26, 2019 12:01 pm
Location: Munich, Germany

Re: Assembly3 preview

Post by ppd »

ToniTen wrote: Tue Jan 25, 2022 8:17 am I do have other snaps (Inkscape notably), and they work, but I don't have this package. After installing it, it works! Thanks a lot!
Yes, the problem is that every application can decide whether it displays the file chooser from "within" the snap, like inkscape does (note the "strange" home folder in inkscape), or whether it calls the file chooser of the host (outside the confinement), like FreeCAD.

Calling the file chooser of the host is the recommended strategy as designed by the developers of flatpaks and snaps as it is a more seamless experience. It's a bit unfortunate that there is no warning that xdg-desktop-portal-gtk is not installed. Also, it should be installed by default; maybe it wasn't for older releases.

It's all part of the sandboxing quest of desktop Linux nowadays. You can read a bit about the motivation here: https://github.com/flatpak/xdg-desktop- ... iderations
Try FreeCAD from the Snap Store: Stable releases (in latest/stable) & daily builds (in latest/edge). Supports installing additional python packages via pip!
Image
User avatar
bambuko
Veteran
Posts: 1549
Joined: Thu Oct 24, 2019 12:53 pm
Location: UK, England, North Devon

Re: Assembly3 preview

Post by bambuko »

Is it possible to have snap and apimage (of the same version of FreeCAD) on the same machine? without causing problems
i.e. I have already apimage installed - do I have to uninstall it before I try snap version?
ToniTen
Posts: 165
Joined: Fri Sep 04, 2020 10:11 am

Re: Assembly3 preview

Post by ToniTen »

ppd wrote: Tue Jan 25, 2022 8:41 am Yes, the problem is that every application can decide whether it displays the file chooser from "within" the snap, like inkscape does (note the "strange" home folder in inkscape), or whether it calls the file chooser of the host (outside the confinement), like FreeCAD.
Oh, I know about the "strange" initial directories for both snaps, and appimages. There's also the issue with the GTK file chooser not showing files with improper capitalization on the extension (.STEP vs step). I much prefer the native file chooser, but it comes with some quirks.
ppd wrote: Tue Jan 25, 2022 8:41 am Calling the file chooser of the host is the recommended strategy as designed by the developers of flatpaks and snaps as it is a more seamless experience. It's a bit unfortunate that there is no warning that xdg-desktop-portal-gtk is not installed. Also, it should be installed by default; maybe it wasn't for older releases.
I understand that this is fresh out of the oven, but maybe a message on the snapcraft page would be in order?
ppd wrote: Tue Jan 25, 2022 8:41 am It's all part of the sandboxing quest of desktop Linux nowadays. You can read a bit about the motivation here: https://github.com/flatpak/xdg-desktop- ... iderations
Oh I totally get it. The day proper sandboxing and Wayland become the norm, things will be much more secure. Don't get me wrong, for distribution provided stuff, native packages are best, but for out of main repositories stuff, or for closed source stuff, sandboxing is a must. The growing pains are going to hurt though.
ToniTen
Posts: 165
Joined: Fri Sep 04, 2020 10:11 am

Re: Assembly3 preview

Post by ToniTen »

bambuko wrote: Tue Jan 25, 2022 9:01 am Is it possible to have snap and apimage (of the same version of FreeCAD) on the same machine? without causing problems
i.e. I have already apimage installed - do I have to uninstall it before I try snap version?
The Appimage is just a file in some place in your file system, which does not update itself (you can use the built in updater though, but that will create a second file). It also won't integrate itself with the rest of your system (so unless you set it manually, no file associations, etc)
The snap will install just as a regular package would, but it will be sandboxed, will bundle the needed dependencies and will update itself silently in the background (I think you can stop this but I never bothered learning how)

Both can coexist no problem
Post Reply