[12:13] <chesty> I've got another weird one I can't work out with snapping x2goclient, x2goclient uses libssh and I get the popup box saying the server is unknown and do I trust it, I click yes, it tries to add it to .ssh/known_hosts but it's not using $HOME, it's trying to open /var/lib/gdm3/.ssh/known_hosts I can't workout where it's getting /var/lib/gdm3 from
[12:15] <chesty> I had a look at x2goclient source, and it's using QDir::homePath() which says "Under non-Windows operating systems the HOME environment variable is used if it exists, otherwise the path returned by the rootPath()."
[12:17] <chesty> HOME=/home/michaelc/snap/x2goclient/x4
[14:32] <mup> PR snapcraft#2385 closed: cli: consolidate re-execution <Created by sergiusens> <Merged by sergiusens> <https://github.com/snapcore/snapcraft/pull/2385>
[14:48] <chesty> I worked it out, haven't fixed it yet. My  user isn't in /etc/passwd it's in ldap and atm `id myuser` isn't found so I guess I need some ldap nss packages
[15:05] <Chipaca> chesty: I wasn't here for the first part of that, what's going on?
[15:07] <chesty> I'm creating a snap with x2goclient, it uses libssh, it's trying to open known_hosts in /var/lib/gdm3/.ssh and I think it's because x2goclient can't find my user hence my users $HOME
[15:08] <chesty> my user is in freeipa not /etc/passwd
[15:09] <Chipaca> chesty: o...k
[15:10] <Chipaca> chesty: that's going to be interesting to get working
[15:11] <chesty> I'm starting x2goclient with a wrapper which logs `id myuser`, it's saying not found atm.
[15:11] <chesty> bummer. snaps only work with users in /etc/passwd?
[15:12] <Chipaca> depends on the snap, some things need to look in /etc/group
[15:12] <Chipaca> let me check for etc/passwd
[15:13] <chesty> i mean can snaps work with users and groups in freeipa?
[15:14] <Chipaca> chesty: for things that need to look up users and groups, no
[15:14] <Chipaca> chesty: but not everything does. In particular that "var/lib/gdm3" thing is your app's doing :-)
[15:15] <chesty> I checked out x2goclient's code, it's calling QDir::homePath() to find the users home dir, it works outside of the snap environment
[15:16] <Chipaca> chesty: the documentation of that function says it uses $HOME
[15:17] <Chipaca> I don't know if that's true :-) but that's what it says
[15:17] <Chipaca> if that's true, then you can see what it should be returning
[15:17] <chesty> I did see that, but HOME is set to the expected value
[15:18] <chesty>  /var/lib/gdm3 is the home dir of the user gdm3
[15:18] <chesty> no idea how it's getting that
[15:18] <Chipaca> and the QDir::homePath implementation I see does the right thing
[15:18] <Chipaca> https://code.woboq.org/qt5/qtbase/src/corelib/io/qfilesystemengine_unix.cpp.html#_ZN17QFileSystemEngine8homePathEv
[15:19] <Chipaca> hmmm
[15:19] <Chipaca> chesty: is gdm3 the last user in /etc/passwd?
[15:19] <Chipaca> if so, do we have a bug
[15:20] <Chipaca> i don't know where though :-)
[15:20] <chesty> it is the last user
[15:20] <Chipaca> but, that's one thought, that something is just using the last entry
[15:20] <Chipaca> chesty: probably best to ask tomorrow when more of the team is around though
[15:21] <chesty> sweet. thanks Chipaca, roungly how many hours away is tomorrow for the team?
[15:21] <chesty> I'm in +10, it's already tomorrow
[15:22] <Chipaca> chesty: 13 hours away
[15:22] <chesty> cheers.
[15:22] <Chipaca> chesty: at least for those that might have some insight into this
[15:23] <Chipaca> chesty: FWIW if it only works via NSS, it's not going to work
[15:23] <Chipaca> fully I mean
[15:23] <Chipaca> NSS is binary-only, and binary-incompatible between currently-supported releases of libc
[15:24] <Chipaca> but something picking up the last entry is clearly a bug :)
[15:25] <chesty> OK, I'll check out strace and see what I see.
[15:25] <Chipaca> (but otoh some things don't take kindly to errors so maybe there's no better way, i don't really know)
[15:25] <Chipaca> chesty: what distro is this on btw?
[15:26] <chesty> 18.04. there's a bug in x2goclient which I've reported so I thought it might be a nice project to learn about snaps and work around the bug
[15:29] <Chipaca> having said that about nss, i wonder if sssd offers a way out
[15:29] <Chipaca> anyway, i need to run
[15:29] <Chipaca> ttfn
[15:30] <chesty> cheers