[Feature request]: Command line option
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
language-selector (Ubuntu) |
New
|
Wishlist
|
Unassigned |
Bug Description
The settings for gnome-language-
# How is it possible to make the DE reload the new values from ~/.pam_environment
So it's possible to modify ~/.pam_environment with a script. But how do you update the system to use the changes? Not even reboot worked. This issue can manually be evaluated in order to make sure that the file content is correct:
############
Step 1, identify how to load ~/.pam_environment to `locale`
* Default Ubuntu MATE 23.04:
~/.pam_environment does not exist
$ locale
LANG=en_US.UTF-8
LANGUAGE=en_US
LC_CTYPE=
LC_NUMERIC=
LC_TIME=
LC_COLLATE=
LC_MONETARY=
LC_MESSAGES=
LC_PAPER=
LC_NAME=
LC_ADDRESS=
LC_TELEPHONE=
LC_MEASUREMENT=
LC_IDENTIFICATI
LC_ALL=
* Open gnome-language-
* Press on the Close button
$ cat .pam_environment
LC_NUMERIC DEFAULT=en_CA.UTF-8
LC_TIME DEFAULT=en_CA.UTF-8
LC_MONETARY DEFAULT=en_CA.UTF-8
LC_PAPER DEFAULT=en_CA.UTF-8
LC_NAME DEFAULT=en_CA.UTF-8
LC_ADDRESS DEFAULT=en_CA.UTF-8
LC_TELEPHONE DEFAULT=en_CA.UTF-8
LC_MEASUREMENT DEFAULT=en_CA.UTF-8
LC_IDENTIFICATION DEFAULT=en_CA.UTF-8
PAPERSIZE DEFAULT=letter
$ locale
LANG=en_US.UTF-8
LANGUAGE=en_US
LC_CTYPE=
LC_NUMERIC=
LC_TIME=
LC_COLLATE=
LC_MONETARY=
LC_MESSAGES=
LC_PAPER=
LC_NAME=
LC_ADDRESS=
LC_TELEPHONE=
LC_MEASUREMENT=
LC_IDENTIFICATI
LC_ALL=
* Sign out, and sign in
$ locale
LANG=en_US.UTF-8
LANGUAGE=en_US
LC_CTYPE=
LC_NUMERIC=
LC_TIME=en_CA.UTF-8
LC_COLLATE=
LC_MONETARY=
LC_MESSAGES=
LC_PAPER=
LC_NAME=en_CA.UTF-8
LC_ADDRESS=
LC_TELEPHONE=
LC_MEASUREMENT=
LC_IDENTIFICATI
LC_ALL=
############
Step 2, demonstrate that ~/.pam_environment can be scripted
Run this in terminal:
sudo tee ~/.pam_environment > /dev/null << 'EOF'
LC_NUMERIC DEFAULT=en_DK.UTF-8
LC_TIME DEFAULT=en_DK.UTF-8
LC_MONETARY DEFAULT=en_DK.UTF-8
LC_PAPER DEFAULT=en_DK.UTF-8
LC_NAME DEFAULT=en_DK.UTF-8
LC_ADDRESS DEFAULT=en_DK.UTF-8
LC_TELEPHONE DEFAULT=en_DK.UTF-8
LC_MEASUREMENT DEFAULT=en_DK.UTF-8
LC_IDENTIFICATION DEFAULT=en_DK.UTF-8
PAPERSIZE DEFAULT=a4
EOF
* Sign out, and sign in to the desktop environment.
* $ locale
LANG=en_US.UTF-8
LANGUAGE=en_US
LC_CTYPE=
LC_NUMERIC=
LC_TIME=en_DK.UTF-8
LC_COLLATE=
LC_MONETARY=
LC_MESSAGES=
LC_PAPER=
LC_NAME=en_DK.UTF-8
LC_ADDRESS=
LC_TELEPHONE=
LC_MEASUREMENT=
LC_IDENTIFICATI
LC_ALL=
Issue:
* Open gnome-language-
# [Feature request]: Implement command line option
Implemented command line options, for both user and system-wide settings, would be useful.
"It doesn't. PAM loads ~/.pam_environment at login." - Gunnar Hjalmarsson
As I described in the steps above for the sake of demonstration to understand how it can be done with commands: If I modify ~/.pam_environment manually (by using a copy that has been generated), and then logged out and login, the new values are not reloaded.
Gunnar has contributed to https:/ /github. com/Vanilla- OS/gnome- language- selector/ blob/main/ LanguageSelecto r/ImConfig. py