Open eggert opened 2 years ago
Mmm... but why your LANG environment variable is "C" instead of "en_US.utf8?
In my system, "locale" returns
LANG=es_ES.UTF-8 LANGUAGE=es_ES:en_US:en LC_CTYPE="es_ES.UTF-8" LC_NUMERIC=es_ES.UTF-8 LC_TIME=es_ES.UTF-8 LC_COLLATE="es_ES.UTF-8" LC_MONETARY=es_ES.UTF-8 LC_MESSAGES="es_ES.UTF-8" LC_PAPER=es_ES.UTF-8 LC_NAME=es_ES.UTF-8 LC_ADDRESS=es_ES.UTF-8 LC_TELEPHONE=es_ES.UTF-8 LC_MEASUREMENT=es_ES.UTF-8 LC_IDENTIFICATION=es_ES.UTF-8 LC_ALL=
and 'env | grep -E '^LC_|LANG=' returns
LANG=es_ES.UTF-8 LC_ADDRESS=es_ES.UTF-8 LC_NAME=es_ES.UTF-8 LC_MONETARY=es_ES.UTF-8 LC_PAPER=es_ES.UTF-8 LC_IDENTIFICATION=es_ES.UTF-8 LC_TELEPHONE=es_ES.UTF-8 LC_MEASUREMENT=es_ES.UTF-8 LC_TIME=es_ES.UTF-8 LC_NUMERIC=es_ES.UTF-8
_Mmm... but why your LANG environment variable is "C" instead of "enUS.utf8?
I don't know and it doesn't matter. I get the same result if LANG is unset, or if it's set to en_US.utf8. Actually, with the latest Chromium, it's even a bit worse, as I get two "Permission denied" messages:
$ chromium --version /bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.utf8) /bin/bash: /home/eggert/.bashrc: Permission denied /bin/bash: /home/eggert/.bashrc: Permission denied Chromium 106.0.5249.119 snap
And the very first time I run Chromium after a reboot and login, it's even worse:
$ chromium --version update.go:85: cannot change mount namespace according to change mount (/var/lib/snapd/hostfs/usr/share/cups/doc-root /usr/share/cups/doc-root none bind,ro 0 0): cannot create directory "/usr/share/cups/doc-root": permission denied update.go:85: cannot change mount namespace according to change mount (/var/lib/snapd/hostfs/usr/share/gimp/2.0/help /usr/share/gimp/2.0/help none bind,ro 0 0): cannot create directory "/usr/share/gimp/2.0": permission denied update.go:85: cannot change mount namespace according to change mount (/var/lib/snapd/hostfs/usr/share/libreoffice/help /usr/share/libreoffice/help none bind,ro 0 0): cannot create directory "/usr/share/libreoffice/help": permission denied update.go:85: cannot change mount namespace according to change mount (/var/lib/snapd/hostfs/usr/share/xubuntu-docs /usr/share/xubuntu-docs none bind,ro 0 0): cannot open directory "/var/lib": permission denied /bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.utf8) /bin/bash: /home/eggert/.bashrc: Permission denied /bin/bash: /home/eggert/.bashrc: Permission denied Chromium 106.0.5249.119 snap
Mmm... the odd thing is that those "Permission denied" come from inside bashrc... That sounds a little bit like there is something that you set in your bashrc that dislikes being executed inside an snap...
That sounds a little bit like there is something that you set in your bashrc that dislikes being executed inside an snap...
It has nothing to do with the contents of .bashrc. I get the diagnostics even if temporarily replace .bashrc with an empty file:
$ ls -l .bashrc -rw-rw-r-- 1 eggert eggert 0 Oct 21 00:57 .bashrc $ cat .bashrc $ chromium --version /bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.utf8) /bin/bash: /home/eggert/.bashrc: Permission denied /bin/bash: /home/eggert/.bashrc: Permission denied Chromium 106.0.5249.119 snap
The problem is that I am setting my ENV and BASH_ENV environment variables, which Bash users are allowed to do:
$ env | grep ENV ENV=/home/eggert/.bashrc BASH_ENV=/home/eggert/.bashrc
but snapd is disallowing access to my .bashrc. If snapd wants to disallow BASH_ENV etc, it shouldn't be passing BASH_ENV to the commands it runs on my behalf.
Ooook... that makes sense now.
But then this bug doesn't belong here... I'll comment it to the snapd people.
I am running Ubuntu 22.04.1 LTS on x86-64 with current patches. I am using snapd 1.60-0ubuntu1.
When I run the shell command "chromium --version" and attempt to debug the resulting situation a bit, I see the following. As you can see, I get a bogus diagnostic about the locale and about my .bashrc. My locale is fine, although evidently snap packages can't use it. My .bashrc is quite simple and has not changed in two decades (it's mode -r--r--r-- which is evidently what snap is complaining about, but that has always worked fine with Bash).
I see similar problems with Firefox and with snap-store, so this is not just a Chromium issue:
Once (just after a long idle period in my login session) it was even worse:
I have filed Ubuntu Bug #1983399 and Bug #1959845 about the locale and .bashrc problems; they suggested that it was an upstream problem and that I file a bug with you. I just now observed the update.go issue and have not filed a bug report with Ubuntu about that.