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...)
User avatar
bambuko
Veteran
Posts: 1549
Joined: Thu Oct 24, 2019 12:53 pm
Location: UK, England, North Devon

Re: Realthunder's Link branch Snap packages

Post by bambuko »

ppd wrote: Tue Jan 25, 2022 4:05 pm Assembly3 has an install dialog for py_slvs included nowadays. No need to use the terminal.
Yes, but... when I used it recently it resulted in error message (still installed though OK)
Anyway, it works fine now (after Kunda1 put me on straight and narrow :lol: )

but when I try to open existing assembly files it results in long error messages :oops:
basically saying that all the linked files do not exist .... :twisted:

Code: Select all

bambuko@Z97MD3Hcd5bddbb:/snap$ free*
FreeCAD 0.20, Libs: 2022.120R14555 (Git shallow)
Adding snap-specific PYTHONPATH to sys.path: /home/bambuko/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
connect failed: No such file or directory
<Exception> File '/run/user/1000/doc/a3927f7c/04_wheels.FCStd' does not exist!
Exception opening file: /run/user/1000/doc/a3927f7c/04_wheels.FCStd [File '/run/user/1000/doc/a3927f7c/04_wheels.FCStd' does not exist!]
<Exception> File '/run/user/1000/doc/a3927f7c/14_8ft_track.FCStd' does not exist!
Exception opening file: /run/user/1000/doc/a3927f7c/14_8ft_track.FCStd [File '/run/user/1000/doc/a3927f7c/14_8ft_track.FCStd' does not exist!]
<Exception> File '/run/user/1000/doc/a3927f7c/02_loco_base.FCStd' does not exist!
Exception opening file: /run/user/1000/doc/a3927f7c/02_loco_base.FCStd [File '/run/user/1000/doc/a3927f7c/02_loco_base.FCStd' does not exist!]
<Exception> File '/run/user/1000/doc/a3927f7c/08_bogie_wheels.FCStd' does not exist!
Exception opening file: /run/user/1000/doc/a3927f7c/08_bogie_wheels.FCStd [File '/run/user/1000/doc/a3927f7c/08_bogie_wheels.FCStd' does not exist!]
<Exception> File '/run/user/1000/doc/a3927f7c/09_tender_wheels.FCStd' does not exist!
Exception opening file: /run/user/1000/doc/a3927f7c/09_tender_wheels.FCStd [File '/run/user/1000/doc/a3927f7c/09_tender_wheels.FCStd' does not exist!]
<Exception> File '/run/user/1000/doc/a3927f7c/08_bogie.FCStd' does not exist!
Exception opening file: /run/user/1000/doc/a3927f7c/08_bogie.FCStd [File '/run/user/1000/doc/a3927f7c/08_bogie.FCStd' does not exist!]
<Exception> File '/run/user/1000/doc/a3927f7c/07_axle_pump_hsg.FCStd' does not exist!
Exception opening file: /run/user/1000/doc/a3927f7c/07_axle_pump_hsg.FCStd [File '/run/user/1000/doc/a3927f7c/07_axle_pump_hsg.FCStd' does not exist!]
3.8e-08 <App> Document.cpp(3224): _1_loco_assembly#Link002.LinkedObject: Link not restored
Linked object: Assembly009
Linked file: 04_wheels.FCStd
0.0783552 <App> Document.cpp(3224): _1_loco_assembly#Link.LinkedObject: Link not restored
Linked object: Assembly
Linked file: 04_wheels.FCStd
0.0850565 <App> Document.cpp(3224): _1_loco_assembly#Link001.LinkedObject: Link not restored
Linked object: Assembly001
Linked file: 04_wheels.FCStd
0.0887584 <App> Document.cpp(3224): _1_loco_assembly#Link003.LinkedObject: Link not restored
Linked object: Assembly004
Linked file: 04_wheels.FCStd
0.0923961 <App> Document.cpp(3224): _1_loco_assembly#Link004.LinkedObject: Link not restored
Linked object: Assembly005
Linked file: 04_wheels.FCStd
0.0992371 <App> Document.cpp(3224): _1_loco_assembly#Link005.LinkedObject: Link not restored
Linked object: Assembly006
Linked file: 04_wheels.FCStd
0.0992947 <App> Document.cpp(3224): _1_loco_assembly#Link006.LinkedObject: Link not restored
Linked object: Assembly007
Linked file: 04_wheels.FCStd
0.099368 <App> Document.cpp(3224): _1_loco_assembly#Link007.LinkedObject: Link not restored
Linked object: Assembly008
Linked file: 04_wheels.FCStd
0.106971 <App> Document.cpp(3224): _1_loco_assembly#Link009.LinkedObject: Link not restored
Linked object: Assembly010
Linked file: 04_wheels.FCStd
0.128364 <App> Document.cpp(3224): _1_loco_assembly#Link010.LinkedObject: Link not restored
Linked object: Assembly002
Linked file: 04_wheels.FCStd
0.135073 <App> Document.cpp(3224): _1_loco_assembly#Link011.LinkedObject: Link not restored
Linked object: Assembly003
Linked file: 04_wheels.FCStd
0.159644 <App> Document.cpp(3224): _1_loco_assembly#Link012.LinkedObject: Link not restored
Linked object: Assembly
Linked file: 14_8ft_track.FCStd
0.159721 <App> Document.cpp(3224): _1_loco_assembly#Link013.LinkedObject: Link not restored
Linked object: Assembly026
Linked file: 02_loco_base.FCStd
0.159777 <App> Document.cpp(3224): _1_loco_assembly#Link014.LinkedObject: Link not restored
Linked object: Assembly027
Linked file: 02_loco_base.FCStd
0.159839 <App> Document.cpp(3224): _1_loco_assembly#Link015.LinkedObject: Link not restored
Linked object: Assembly051
Linked file: 02_loco_base.FCStd
0.159913 <App> Document.cpp(3224): _1_loco_assembly#Link017.LinkedObject: Link not restored
Linked object: Assembly034
Linked file: 02_loco_base.FCStd
0.159973 <App> Document.cpp(3224): _1_loco_assembly#Link016.LinkedObject: Link not restored
Linked object: Assembly054
Linked file: 02_loco_base.FCStd
0.160042 <App> Document.cpp(3224): _1_loco_assembly#Link018.LinkedObject: Link not restored
Linked object: Assembly081
Linked file: 02_loco_base.FCStd
0.160084 <App> Document.cpp(3224): _1_loco_assembly#Link019.LinkedObject: Link not restored
Linked object: Assembly028
Linked file: 02_loco_base.FCStd
0.160136 <App> Document.cpp(3224): _1_loco_assembly#Link020.LinkedObject: Link not restored
Linked object: Assembly033
Linked file: 02_loco_base.FCStd
0.160179 <App> Document.cpp(3224): _1_loco_assembly#Link021.LinkedObject: Link not restored
Linked object: Assembly083
Linked file: 02_loco_base.FCStd
0.178668 <App> Document.cpp(3224): _1_loco_assembly#Link031.LinkedObject: Link not restored
Linked object: Assembly001
Linked file: 08_bogie.FCStd
0.18316 <App> Document.cpp(3224): _1_loco_assembly#Link032.LinkedObject: Link not restored
Linked object: Assembly075
Linked file: 07_axle_pump_hsg.FCStd
0.183247 <App> Document.cpp(3224): _1_loco_assembly#Link033.LinkedObject: Link not restored
Linked object: Assembly077
Linked file: 07_axle_pump_hsg.FCStd
0.183311 <App> Document.cpp(3224): _1_loco_assembly#Link034.LinkedObject: Link not restored
Linked object: Assembly078
Linked file: 07_axle_pump_hsg.FCStd
0.183386 <App> Document.cpp(3224): _1_loco_assembly#Link035.LinkedObject: Link not restored
Linked object: Assembly079
Linked file: 07_axle_pump_hsg.FCStd
0.185222 <App> Document.cpp(3224): _1_loco_assembly#Link023.LinkedObject: Link not restored
Linked object: Assembly038
Linked file: 08_bogie_wheels.FCStd
0.25807 <App> Document.cpp(3224): _1_loco_assembly#Link024.LinkedObject: Link not restored
Linked object: Assembly039
Linked file: 08_bogie_wheels.FCStd
0.342313 <App> Document.cpp(3224): _1_loco_assembly#Link029.LinkedObject: Link not restored
Linked object: Assembly002
Linked file: 09_tender_wheels.FCStd
0.373547 <App> Document.cpp(3224): _1_loco_assembly#Link026.LinkedObject: Link not restored
Linked object: Assembly
Linked file: 09_tender_wheels.FCStd
0.405063 <App> Document.cpp(3224): _1_loco_assembly#Link028.LinkedObject: Link not restored
Linked object: Assembly001
Linked file: 09_tender_wheels.FCStd
User avatar
ppd
Posts: 107
Joined: Tue Feb 26, 2019 12:01 pm
Location: Munich, Germany

Re: Realthunder's Link branch Snap packages

Post by ppd »

bambuko wrote: Tue Jan 25, 2022 5:14 pm but when I try to open existing assembly files it results in long error messages :oops:
Looks like you're accessing a file via the document portal. I quote:

Code: Select all

 The FileChooser portal allows sandboxed applications to ask 
 the user for access to files outside the sandbox. 
 The portal backend will present the user with a file chooser dialog.


The selected files will be made accessible to the application via the 
document portal, and the returned URI will point into the document 
portal fuse filesystem in /run/user/$UID/doc/. 
(https://flatpak.github.io/xdg-desktop-portal/)

If the files are in your home folder, the portal should return a normal path. Where are those files?
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: Realthunder's Link branch Snap packages

Post by bambuko »

ppd wrote: Tue Jan 25, 2022 5:36 pm ...If the files are in your home folder, the portal should return a normal path. Where are those files?
Thank you!
I have suspected it was something like this ... (not exactly the clearest thing about snap :mrgreen: )
The file (all my data) is kept on NAS and accessible from any PC connected to it.
On my Linux machines the mount point for NAS data is in my home directory:

Code: Select all

 home/bambuko/My_NAS_Files
so in theory this should be OK?
User avatar
ppd
Posts: 107
Joined: Tue Feb 26, 2019 12:01 pm
Location: Munich, Germany

Re: Realthunder's Link branch Snap packages

Post by ppd »

What kind of mount is it? CIFS, sshfs? The mount path alone is not enough; I think it's a little more complicated than that.

I just conducted a little experiment: A ssh mount via sshfs -o allow_other,uid=1001,gid=1002 user@server:/folder ~/remotedir works perfectly fine. The key is the uid & gid mapping (Apparmor is very strict :D) and the allow_other option (so snapd as root can access it, I guess).
Last edited by ppd on Tue Jan 25, 2022 6:58 pm, edited 1 time in total.
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: Realthunder's Link branch Snap packages

Post by bambuko »

ppd wrote: Tue Jan 25, 2022 6:44 pm What kind of mount is it? CIFS, sshfs? The mount path alone is not enough; I think it's a little more complicated than that.
sorry, cifs
User avatar
ppd
Posts: 107
Joined: Tue Feb 26, 2019 12:01 pm
Location: Munich, Germany

Re: Realthunder's Link branch Snap packages

Post by ppd »

bambuko wrote: Tue Jan 25, 2022 6:57 pm
ppd wrote: Tue Jan 25, 2022 6:44 pm What kind of mount is it? CIFS, sshfs? The mount path alone is not enough; I think it's a little more complicated than that.
sorry, cifs
Works for me. At least when I specify the uid and gid mapping as described above for sshfs.
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: Realthunder's Link branch Snap packages

Post by bambuko »

Thank you,
I will play with it tomorrow - must admit more complicated and PITA than what I was hoping it would be... :cry:
User avatar
ppd
Posts: 107
Joined: Tue Feb 26, 2019 12:01 pm
Location: Munich, Germany

Re: Realthunder's Link branch Snap packages

Post by ppd »

For the record, I used this command:

Code: Select all

sudo mount -t cifs -o guest,uid=$UID //server/folder  ~/remotedir/ 
The key is to specify a uid. You can set this in /etc/fstab or in a systemd mount unit.
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: Realthunder's Link branch Snap packages

Post by bambuko »

and I thought that snap was meant to better at integrating the app.... :mrgreen: :D
oh the joys of Linux :x

no doubt I will be back with more questions....
User avatar
bambuko
Veteran
Posts: 1549
Joined: Thu Oct 24, 2019 12:53 pm
Location: UK, England, North Devon

Re: Realthunder's Link branch Snap packages

Post by bambuko »

ppd wrote: Tue Jan 25, 2022 7:26 pm The key is to specify a uid. You can set this in /etc/fstab or in a systemd mount unit.
My "mount at boot" fstab line for NAS specifies uid and files open fine in snap FreeCAD as long as there are no external links.
It's not the location that is an issue.
Try opening an assembly file with external links....
Post Reply