SSH login lanuage error

Having issues with your DietPi installation, or, found a bug? Post it here.
Gord_W
Posts: 134
Joined: Sat Oct 24, 2015 6:30 pm

SSH login lanuage error

Post by Gord_W »

Hi,

Using NanoPi Neo with fresh install of current download version (DietPi_v145_NanoPiNEO-armv7-(Jessie)) which has been auto updated to current version.

No software installed. SSH into device using ethernet.

Not much changed in dietpi-config - Canadian English, time zone, LEDs - and I don't think much else.


gordon@gordon-linux ~ $ ssh root@192.168.1.27
root@192.168.1.27's password:
-bash: export: `#LANG=en_GB.UTF-8': not a valid identifier

[3;J
───────────────────────────────────────
DietPi | 14:31 | Thu 11/16/17
───────────────────────────────────────
V158 | NanoPi Neo (armv7l)
───────────────────────────────────────
IP Address | 192.168.1.27
───────────────────────────────────────

There are some funny characters in the line above the DietPi time - date line too.

Regards,
Gordon Williams
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: SSH login lanuage error

Post by Fourdee »

Gord_W wrote:Hi,

Using NanoPi Neo with fresh install of current download version (DietPi_v145_NanoPiNEO-armv7-(Jessie)) which has been auto updated to current version.

No software installed. SSH into device using ethernet.

Not much changed in dietpi-config - Canadian English, time zone, LEDs - and I don't think much else.


gordon@gordon-linux ~ $ ssh root@192.168.1.27
root@192.168.1.27's password:
-bash: export: `#LANG=en_GB.UTF-8': not a valid identifier

[3;J
───────────────────────────────────────
DietPi | 14:31 | Thu 11/16/17
───────────────────────────────────────
V158 | NanoPi Neo (armv7l)
───────────────────────────────────────
IP Address | 192.168.1.27
───────────────────────────────────────

There are some funny characters in the line above the DietPi time - date line too.

Regards,
Gordon Williams
Hi Gordon,

Please ensure en_GB.UTF-8 is installed on the system. Its required by DietPi to ensure all scripts scrape correctly, you can select another default if needed, but en_GB.UTF-8 must be installed.
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Gord_W
Posts: 134
Joined: Sat Oct 24, 2015 6:30 pm

Re: SSH login lanuage error

Post by Gord_W »

I didn't uninstall en_GB, just added Canadian English. I will go back and do a fresh install from the start and see if I can repeat the problem.

From the error message, it looked like LANG=en_GB.UTF-8 was commented out.

Gordon
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: SSH login lanuage error

Post by Fourdee »

Gord_W wrote:I didn't uninstall en_GB, just added Canadian English. I will go back and do a fresh install from the start and see if I can repeat the problem.

From the error message, it looked like LANG=en_GB.UTF-8 was commented out.

Gordon
Hi Gordon,

Yep, seen the comment, which is strange as the banner script is coded as below:
https://github.com/Fourdee/DietPi/blob/ ... banner#L21

If it happens again, please check which of the following scripts causes the "export" error:

Code: Select all

/DietPi/dietpi/login
/DietPi/dietpi/dietpi-banner
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Gord_W
Posts: 134
Joined: Sat Oct 24, 2015 6:30 pm

Re: SSH login lanuage error

Post by Gord_W »

Now doing a fresh install. During the first run right after after ssh login I get the same funny characters as seen below.
Will check to see what else happens.
Gordon

DietPi-Set_Hardware
─────────────────────────────────────────────────────
Mode: preferipversion (auto)
Please wait...

[Ok] preferipversion auto | Completed

[3;J
───────────────────────────────────────
DietPi | 17:45 | Sun 19/11/17
───────────────────────────────────────
V144 | NanoPi Neo (armv7l)
───────────────────────────────────────
IP Address | 192.168.1.10
───────────────────────────────────────

Welcome to DietPi-Software

Edit: by funny characters I mean [3;J
before the [ is a square box with very small printing in it.
Gord_W
Posts: 134
Joined: Sat Oct 24, 2015 6:30 pm

Re: SSH login lanuage error

Post by Gord_W »

With no locale or language change when I log on I get

gordon@gordon-linux ~ $ ssh root@192.168.1.10
root@192.168.1.10's password:
[3;J

(same funny characters written to screen on line below PW.)

Next I will change locale and language.
Gord_W
Posts: 134
Joined: Sat Oct 24, 2015 6:30 pm

Re: SSH login lanuage error

Post by Gord_W »

language changed

Generating locales (this might take a while)...
en_CA.UTF-8... done
en_GB.UTF-8... done
Generation complete.
[3;J

I guess the box and [3;J are some sort of messed up screen control characters??

Now rebooting ...
SHH in

Yes! got it again!

Connection to 192.168.1.10 closed by remote host.
Connection to 192.168.1.10 closed.
gordon@gordon-linux ~ $ ssh root@192.168.1.10
root@192.168.1.10's password:
-bash: export: `#LANG=en_GB.UTF-8': not a valid identifier
[3;J

Now for the files that you asked for .....
Gord_W
Posts: 134
Joined: Sat Oct 24, 2015 6:30 pm

Re: SSH login lanuage error

Post by Gord_W »

The only place that I can see LANG in /DietPi/dietpi/login
#Force en_GB Locale for whole script. Prevents incorrect parsing with non-english locales.
LANG=en_GB.UTF-8
same for /DietPi/dietpi/dietpi-banner
#Force en_GB Locale for whole script. Prevents incorrect parsing with non-english locales.
LANG=en_GB.UTF-8

The scripts are kind of long to post here and I have already made lots of posts detailing what I have done so that you can hopefully repeat it.
I can send them to you separately.

thanks,
Gordon Williams
Gord_W
Posts: 134
Joined: Sat Oct 24, 2015 6:30 pm

Re: SSH login lanuage error

Post by Gord_W »

Hmm,
One other thing that may or may not be of interest to you.

root@DietPi:~# locale
LANG=
LANGUAGE=
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=

That is different than my personal computer.

Gordon
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: SSH login lanuage error

Post by Fourdee »

Gord_W wrote:Hmm,
One other thing that may or may not be of interest to you.

root@DietPi:~# locale
LANG=
LANGUAGE=
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=

That is different than my personal computer.

Gordon
Which SSH client are you running? Seems to be running in POSIX compatibility mode.
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Post Reply