snap-based programs complain about locale, permission
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Snapcraft |
New
|
Undecided
|
Unassigned | ||
snapd (Ubuntu) |
Incomplete
|
Undecided
|
Unassigned |
Bug Description
This is a followup to Launchpad Bug#1959845, with more information about the bug.
I am running Ubuntu 22.04 LTS on x86-64 with current patches. I have snapd 2.55.5+22.04.
When I run the shell command "chromium --version" and attempt to debug the resulting situation a bit, I see the following:
$ chromium --version
/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.utf8)
/bin/bash: /home/eggert/
Chromium 103.0.5060.114 snap
$ echo $SHELL
/bin/bash
$ ls -l $HOME/.bashrc
-r--r--r-- 1 eggert eggert 420 Apr 25 2002 /home/eggert/
$ env | grep en_US
LC_ALL=en_US.utf8
$ locale
LANG=C
LANGUAGE=
LC_CTYPE=
LC_NUMERIC=
LC_TIME=
LC_COLLATE=
LC_MONETARY=
LC_MESSAGES=
LC_PAPER=
LC_NAME=
LC_ADDRESS=
LC_TELEPHONE=
LC_MEASUREMEN
LC_IDENTIFICA
LC_ALL=en_US.utf8
$ locale -a | grep en_US
en_US.iso885915
en_US.utf8
$ LC_ALL=C chromium --version
/bin/bash: /home/eggert/
Chromium 103.0.5060.114 snap
As you can see, I get some bogus diagnostics about the locale and the .bashrc permissions.
My locale is fine - though evidently snap packages can't use it.
I do have a .bashrc file. This file is not executable and it shouldn't be executable as it's not intended to be a standalone command. It has worked just fine for decades, when I log in via Bash or run Bash in the usual way.
I reported a similar problem with Firefox in Launchpad Bug#1959845, and the response was "this is a bug with the snap packaging of Firefox, not with snapd. Please file a bug with Mozilla upstream". Although I did so here:
https:/
their response was that it wasn't a Firefox bug. And now that I see a similar problem with Chromium it appears that this is a snapd issue, not an issue with individual programs.
One other thing that may be relevant is that I mention .bashrc in my environment:
$ env | grep bashrc home/eggert/ .bashrc ENV=/home/ eggert/ .bashrc
ENV=/
BASH_