So… I think this is something just as b0rken, and related to filesystem mounts.
I looked and found 4 directories named “onedrive”
chronos@localhost / $ sudo find / -type d -name onedrive
Password:
/home/chronos/u-MAGICNUMBER/Downloads/onedrive
/home/chronos/user/Downloads/onedrive
/home/user/MAGICNUMBER/Downloads/onedrive
/home/.shadow/MAGICNUMBER/mount/user/Downloads/onedrive
I don’t know if the “MAGICNUMBER” is unique to my ID or not, so I’ve redacted it.
Now this appears to be related to how the system encrypts files…
chronos@localhost / $ mount | grep chronos
/dev/mapper/encstateful on /home/chronos type ext4 (rw,nosuid,nodev,noexec,noatime,discard,commit=600,data=ordered)
/home/.shadow/MAGICNUMBER/vault on /home/chronos/user type ecryptfs (rw,nosuid,nodev,noexec,...)
/home/.shadow/MAGICNUMBER/vault on /home/chronos/u-MAGICNUMBER type ecryptfs (rw,nosuid,nodev,noexec,...)
And it looks like the ChromeOS file view uses the u-MAGICNUMBER
view of the filesystem. So, clearly, mounting on /home/chronos/user/...
won’t show up under /home/chronos/u-MAGICNUMBER
and that’s why I get the empty view.
If I change my script so it says
HOME=/home/chronos/u-MAGICNUMBER
at the beginning…
Then it works! The mounted drive shows up in the file manager.
Possibly related to https://bugs.chromium.org/p/chromium/issues/detail?id=309556