Page 1 of 2

Setting up locale

Posted: 04 Feb 2018, 15:27
by M. Eerie
I've tried to

Code: Select all

setup-locale
with no success. A module is built, but the language still is english.

How do I ???

:%)

(Also how can I save Numlock state?)

Thanks

Setting up locale

Posted: 04 Feb 2018, 23:27
by ncmprhnsbl
yeah, this function is not currently implemented ie:

Code: Select all

$pserver/$arch/current/export/locales
does not exist..
i have the exported locales(stripped from base modules).
i'll ask brokenman about uploading them to the server...
M. Eerie wrote:
04 Feb 2018, 15:27
how can I save Numlock state?
do:

Code: Select all

root #rc-update add numlock default
root #/etc/init.d/numlock start
then save /etc/runlevels/default/numlock (which is a symlink) to a module..

Setting up locale

Posted: 09 Feb 2018, 21:13
by M. Eerie
Thank you!
:)

Setting up locale

Posted: 09 Mar 2018, 17:17
by M. Eerie
Further investigating, I've found that /etc/profile.d/locale.sh contains several variables:
LC_ALL=C
LC_CTYPE
LANG

and so on.

Should I made changes there in order to export locale variables to the whole system?

Concerning to switch numlock on when desktop is alive:
ncmprhnsbl wrote:
04 Feb 2018, 23:27
then save /etc/runlevels/default/numlock (which is a symlink) to a module..
I've followed those steps with no luck.

I've check it out the numlock script, and found that is looking for /dev/vc(...) but they don't exists in filesystem.

(Sorry for the double-trouble)

Cheers!

Setting up locale

Posted: 09 Mar 2018, 22:03
by ncmprhnsbl
M. Eerie wrote:
09 Mar 2018, 17:17
Further investigating, I've found that /etc/profile.d/locale.sh contains several variables:
LC_ALL=C
LC_CTYPE
LANG
and so on.

Should I made changes there in order to export locale variables to the whole system?
you could be right, here's what artix wiki https://wiki.artixlinux.org/Main/Instal ... figuration says:
Generate locales:

Code: Select all

 nano /etc/locale.gen  <- uncomment your locale
 locale-gen
To set the locale systemwide, edit /etc/profile.d/locale.sh (which is sourced by /etc/profile) or /etc/bash/bashrc.d/artix.bashrc or /etc/bash/bashrc.d/local.bashrc; user-specific changes may be made to their respective ~/.bashrc, for example:

Code: Select all

 export LANG="en_US.UTF-8"
 export LC_COLLATE="C"
looking at /usr/local/bin/setup-locales-live, it mentions localectl, which i guess is a systemd thing(therefore a leftover from a previous nemesis(systemd)version...

anyway heres the full locales .xzm : link 53mb
just extract it and grab the /usr/share/locales/? folder you need, and try editing /etc/locales.gen(uncomment the relevant one) and edit /etc/profile.d/locale.sh
and see how that goes
M. Eerie wrote:
09 Mar 2018, 17:17
I've check it out the numlock script, and found that is looking for /dev/vc(...) but they don't exists in filesystem.
not in the live filesystem? i'll have to look into it...

Setting up locale

Posted: 11 Mar 2018, 09:12
by M. Eerie
Thank you so much, ncmprhnsbl

Refering to
M. Eerie wrote:
09 Mar 2018, 17:17
/dev/vc(...) but they don't exists in filesystem
forget it. It happened in another (older) computer, but haven't see it again.

Thanks again.

2018 Updated Nemesis Base Modules

Posted: 04 Aug 2018, 15:03
by M. Eerie
ncmprhnsbl, I've managed to wipe my previous Nemesis usb key, and no way to recover from it.

How can I build spanish locales from scratch?

I've been unsuccessful trying to build with locale-gen both with guest/root users.

Thanks!

(Also numlock issue remains)

2018 Updated Nemesis Base Modules

Posted: 04 Aug 2018, 23:38
by ncmprhnsbl
hi M. Eerie, do you have the module from here: Setting up locale (Post by ncmprhnsbl #63133) ?
and the numlock instructions in that thread not working?

2018 Updated Nemesis Base Modules

Posted: 05 Aug 2018, 21:24
by M. Eerie
ncmprhnsbl wrote:
04 Aug 2018, 23:38
do you have the module from here
Yes, I have it.

I think I've set locale to es-ES.utf8 but your module only provides es-ES

Checking...

EDIT: No way

Code: Select all

bash: warning: setlocale: LC_ALL: cannot change locale (es_ES)

2018 Updated Nemesis Base Modules

Posted: 06 Aug 2018, 02:39
by ncmprhnsbl
"setlocale" i presume, is haskell-setlocale, that you added?
i have little to no knowledge about language/locale setting, being an ignorant monolingual ;)
you have done this bit first? :

Code: Select all

 nano /etc/locale.gen  <- uncomment your locale
 locale-gen
further reference:
https://wiki.artixlinux.org/Main/Instal ... figuration
https://wiki.archlinux.org/index.php/Locale
https://jlk.fjfi.cvut.cz/arch/manpages/man/setlocale.3
(i'll probably move these post to the locale topic) done
EDIT:
i messed about some more and have put together a es_ES locale module for you, that appears to work..
uploading it now (and updated base modules)

Setting up locale

Posted: 06 Aug 2018, 08:47
by ncmprhnsbl
M. Eerie, here is a locale module to try:
es_ES-locale.xzm 1.4 MB
md5sum: 9436d4f9e75779e1993a5dc62068a01e
contents: (not certain everything is needed)

Code: Select all

es_ES-locale
|-- etc
|   |-- bash
|   |   `-- bashrc.d
|   |       `-- porteus.bashrc
|   `-- locale.gen
`-- usr
    |-- lib
    |   `-- locale
    |       `-- locale-archive
    `-- share
        |-- i18n
        |   `-- locales
        |       `-- es_ES
        `-- locale
            |-- es
            |   |-- LC_MESSAGES
            |   |   |-- ConsoleKit2.mo
....................................................................many .mo
            |   |   `-- xkeyboard-config.mo
            |   `-- LC_TIME
            |       `-- coreutils.mo -> ../LC_MESSAGES/coreutils.mo
            `-- es_ES
                `-- LC_MESSAGES
                    `-- libvisual-0.4.mo

15 directories, 125 files
i'll write up the process in a howto...

Setting up locale

Posted: 06 Aug 2018, 18:10
by M. Eerie
ncmprhnsbl wrote:
06 Aug 2018, 08:47
i'll write up the process in a howto...
Thank you so much. Worked like a charm.

:good: :beer:

My xfce4-terminal is throwing this message:

Code: Select all

grep: /etc/porteus.d/login: No existe el fichero o el directorio


"grep: /etc/porteus.d/login: file or directory doesn't exists "

Found that string, in:
  • /mnt/live/memory/images/es_ES-locale.xzm/etc/bash/bashrc.d/porteus.bashrc
  • /mnt/live/memory/images/002-gui-20180706.xzm/usr/local/bin/autologin
  • /mnt/live/memory/images/001-core-20180706.xzm/etc/bash/bashrc.d/porteus.bashrc
  • /mnt/live/memory/images/002-gui-20180706.xzm/usr/local/bin/xdm

Should I remove/ comment next block?

Code: Select all

# Run the cliexec command if present
CMD=`egrep -o " cliexec=[^ ]+" /proc/cmdline | cut -d= -f2 | tr "~" " "`
[ -z "$CMD" ] && CMD=`grep "^cliexec=" /etc/porteus.d/login| cut -d'=' -f2`
[ "$CMD" ] && { echo "Starting 'cliexec=' commands"; su - -c "$CMD"; }
Also I've noticed these lines:

Code: Select all

#set es_ES locale
export LANG="es_ES.UTF-8"
export LC_COLLATE="C"
Shouldn't be LC_COLLATE set to es_ES.UTF-8 as well ?

Thanks again.

Setting up locale

Posted: 06 Aug 2018, 22:53
by ncmprhnsbl
M. Eerie wrote:
06 Aug 2018, 18:10
"grep: /etc/porteus.d/login: file or directory doesn't exists "
the question is: why isn't this there? /etc/porteus.d and it's contents should be created at boot via scripts in initrd
M. Eerie wrote:
06 Aug 2018, 18:10
Shouldn't be LC_COLLATE set to es_ES.UTF-8 as well ?
quite possibly
arch wiki says: https://wiki.archlinux.org/index.php/Lo ... _collation

Setting up locale

Posted: 08 Dec 2021, 04:47
by Rapha_
---> Hello, can we know where are defined these variables currently ? Because I can't change them :

Code: Select all

guest@porteus:~$ locale -a
C
C.utf8
POSIX
en_US
en_US.utf8
Also, can we define "LANG=" only for guest ?

Setting up locale

Posted: 08 Dec 2021, 11:35
by M. Eerie
Hi Rapha.

Code: Select all

 @porteus:~/Desktop $ locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME=en_US.UTF-8
LC_COLLATE=C
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
Rapha_ wrote:
08 Dec 2021, 04:47
Also, can we define "LANG=" only for guest ?
You can. I've just unset LANG in root account, opened a guest terminal and all locale environment remains untouched.