I’m developing a tool to help gathering data when filing a bug about a device.
I need to access the content of the file
/var/lib/ubuntu_dist_channel (when available). It’s the same file that is used by ubuntu-report to gather info about an OEM image (see ubuntu-report source code here).
The problem is that this file is not available from within the snap, not even in
# From outside the snap on a device with an OEM image $ ls /var/lib/ubuntu_dist_channel /var/lib/ubuntu_dist_channel $ ls -l /var/lib/ubuntu_dist_channel -rwxr-xr-x 1 root root 209 六 11 14:44 /var/lib/ubuntu_dist_channel # From inside the snap $ snap run --shell qabro To run a command as administrator (user "root"), use "sudo <command>". See "man sudo_root" for details. $ ls -l /var/lib/ubuntu_dist_channel ls: cannot access '/var/lib/ubuntu_dist_channel': No such file or directory
How can I access the content of this file?