/srv/irclogs.ubuntu.com/2018/10/28/#snappy.txt

chestyI'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 from12:13
chestyI 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:15
chestyHOME=/home/michaelc/snap/x2goclient/x412:17
mupPR snapcraft#2385 closed: cli: consolidate re-execution <Created by sergiusens> <Merged by sergiusens> <https://github.com/snapcore/snapcraft/pull/2385>14:32
chestyI 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 packages14:48
Chipacachesty: I wasn't here for the first part of that, what's going on?15:05
chestyI'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 $HOME15:07
chestymy user is in freeipa not /etc/passwd15:08
Chipacachesty: o...k15:09
Chipacachesty: that's going to be interesting to get working15:10
chestyI'm starting x2goclient with a wrapper which logs `id myuser`, it's saying not found atm.15:11
chestybummer. snaps only work with users in /etc/passwd?15:11
Chipacadepends on the snap, some things need to look in /etc/group15:12
Chipacalet me check for etc/passwd15:12
chestyi mean can snaps work with users and groups in freeipa?15:13
Chipacachesty: for things that need to look up users and groups, no15:14
Chipacachesty: but not everything does. In particular that "var/lib/gdm3" thing is your app's doing :-)15:14
chestyI checked out x2goclient's code, it's calling QDir::homePath() to find the users home dir, it works outside of the snap environment15:15
Chipacachesty: the documentation of that function says it uses $HOME15:16
ChipacaI don't know if that's true :-) but that's what it says15:17
Chipacaif that's true, then you can see what it should be returning15:17
chestyI did see that, but HOME is set to the expected value15:17
chesty /var/lib/gdm3 is the home dir of the user gdm315:18
chestyno idea how it's getting that15:18
Chipacaand the QDir::homePath implementation I see does the right thing15:18
Chipacahttps://code.woboq.org/qt5/qtbase/src/corelib/io/qfilesystemengine_unix.cpp.html#_ZN17QFileSystemEngine8homePathEv15:18
Chipacahmmm15:19
Chipacachesty: is gdm3 the last user in /etc/passwd?15:19
Chipacaif so, do we have a bug15:19
Chipacai don't know where though :-)15:20
chestyit is the last user15:20
Chipacabut, that's one thought, that something is just using the last entry15:20
Chipacachesty: probably best to ask tomorrow when more of the team is around though15:20
chestysweet. thanks Chipaca, roungly how many hours away is tomorrow for the team?15:21
chestyI'm in +10, it's already tomorrow15:21
Chipacachesty: 13 hours away15:22
chestycheers.15:22
Chipacachesty: at least for those that might have some insight into this15:22
Chipacachesty: FWIW if it only works via NSS, it's not going to work15:23
Chipacafully I mean15:23
ChipacaNSS is binary-only, and binary-incompatible between currently-supported releases of libc15:23
Chipacabut something picking up the last entry is clearly a bug :)15:24
chestyOK, 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
Chipacachesty: what distro is this on btw?15:25
chesty18.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 bug15:26
Chipacahaving said that about nss, i wonder if sssd offers a way out15:29
Chipacaanyway, i need to run15:29
Chipacattfn15:29
chestycheers15:30

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!