SSH issue with Virtual.x86_64-8.0.1.ova + locale questions

  • Hi all,
    I have 2 questions:
    1. possible ssh issue ?
    seems like ssh server is broken in v LibreELEC-Virtual.x86_64-8.0.1.ova :


    in my kodi addon.
    There are 2 available locales in LibreELEC:
    [code=php]
    LibreELEC800:~ # locale -a
    C
    POSIX
    LibreELEC800:~ #
    [/php]
    and locale-gen is missing
    [code=php]
    LibreELEC800:/ # find -name "locale*"
    ./usr/bin/locale
    ./usr/bin/localedef
    ./usr/lib/python2.7/locale.pyo
    ./usr/share/X11/locale
    ./usr/share/X11/locale/locale.alias
    ./usr/share/X11/locale/locale.dir
    ./usr/share/i18n/locales
    LibreELEC800:/ #
    [/php]

    How to add cs_CZ.UTF-8 to available locales ?
    Thank you very much for clarification.

  • Thanks for response.
    The problem was with small initial partition for clean install - simply there was not free space enough to install even addons :)
    So expanding virtual disk capacity and clean install solved my ssh issues.

    What about my 2nd question - please see first post - possibility to expand available locale ?

  • max37online

    It seems we hit an old issue from times of openelec:
    OpenELEC Mediacenter - OpenELEC Forum - New Locale (1/1)
    add locales to build by henkwiedig · Pull Request #1001 · OpenELEC/OpenELEC.tv · GitHub
    and there is no public interest to change current state b/c ascii sorting should be enough for all :( sad but true

    It is possible to generate needed locale in Linux either with locale-gen or localedef - please see:
    Linux: Define Locale and Language Settings - ShellHacks
    and Locales in Debian
    I have tried but I hit the wall again:
    [code=php]
    LibreELEC:/ # localedef -i cs_CZ -f "UTF-8" 'cs_CZ.UTF-8'
    character map file `UTF-8' not found: No such file or directory
    cannot read character map directory `/usr/share/i18n/charmaps': No such file or
    [/php]

    So users have to cope with bad sorting in addon I am trying maintain:

    or choose another Linux distribution.

  • zbyna

    Sad but true, but I hope, that locale & localedef will help us!

    I have tried to install new locale:
    [code=php]
    htpc:~/locale # localedef -i ru_RU -f UTF-8 /storage/locale/ru_RU --no-archive
    htpc:~/locale # ls
    ru_RU
    htpc:~/locale # ls ru_RU
    LC_ADDRESS LC_IDENTIFICATION LC_MONETARY LC_PAPER
    LC_COLLATE LC_MEASUREMENT LC_NAME LC_TELEPHONE
    LC_CTYPE LC_MESSAGES LC_NUMERIC LC_TIME
    htpc:~/locale # ls ru_RU -l
    total 1568
    -rw-r--r-- 1 root root 151 Apr 13 22:07 LC_ADDRESS
    -rw-r--r-- 1 root root 1243770 Apr 13 22:07 LC_COLLATE
    -rw-r--r-- 1 root root 317872 Apr 13 22:07 LC_CTYPE
    -rw-r--r-- 1 root root 341 Apr 13 22:07 LC_IDENTIFICATION
    -rw-r--r-- 1 root root 23 Apr 13 22:07 LC_MEASUREMENT
    drwxr-xr-x 2 root root 4096 Apr 13 22:07 LC_MESSAGES
    -rw-r--r-- 1 root root 294 Apr 13 22:07 LC_MONETARY
    -rw-r--r-- 1 root root 62 Apr 13 22:07 LC_NAME
    -rw-r--r-- 1 root root 54 Apr 13 22:07 LC_NUMERIC
    -rw-r--r-- 1 root root 34 Apr 13 22:07 LC_PAPER
    -rw-r--r-- 1 root root 52 Apr 13 22:07 LC_TELEPHONE
    -rw-r--r-- 1 root root 2498 Apr 13 22:07 LC_TIME
    htpc:~/locale #

    [/php]

    It seems to me, I have been generated new locale ru_RU, and now its needed to install this locale to the system.
    Am I right?
    Any ideas?

    Edited once, last by max37online (April 13, 2017 at 8:13 PM).

  • In my lamp addon I have locales inside addon and using them with LOCPATH environment variable before starting program

    Quote


    LOCPATH is an environment variable that tells the setlocale() function
    the name of the directory from which to load locale object files.

    Code
    # start httpd
    LOCPATH=$ADDON_DIR/lib/locale exec $ADDON_DIR/bin/httpd ......

    But this is binary addon running outside of kodi. For kodi this variable should be set before starting kodi. No idea how to achieve that (maybe /run/libreelec/kodi.conf).

  • max37online

    I am on vmware and I am not able to reproduce your way b/c of
    [code=php]
    character map file `UTF-8' not found: No such file or directory
    cannot read character map directory `/usr/share/i18n/charmaps': No such file or directory
    LibreELEC:/ #
    [/php]

    according to: Linux: Define Locale and Language Settings - ShellHacks
    should be enough:
    [code=php]
    localedef -c -i hi_IN -f UTF-8 hi_IN.UTF-8
    locale -a
    [/php]

    I would set locale in python addon:
    [code=php]
    LibreELEC:~ # python
    Python 2.7.13 (default, Feb 28 2017, 07:41:10)
    [GCC 6.2.0] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import locale
    >>> locale.setlocale(locale.LC_ALL,'cs_CZ.utf8')
    [/php]

    Although there is quite interesting info about hacking :) libreELEC which enable to unpack read only system and change what one wants:
    HowTo – Update/Change openELEC/LibreELEC root ssh password – Dustplanet
    Wrightrocket: OpenElec on the Raspberry Pi

    Edited once, last by zbyna (April 14, 2017 at 1:55 AM).