Gordon,
Seems related to SSH client, please see below:
https://serverfault.com/questions/79225 ... mmand-line
SSH login lanuage error
Re: SSH login lanuage error
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.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Re: SSH login lanuage error
I don't see why the ssh client on my desktop would change the output of the dietpi locale command.
It is the same as far as I know that I have been using for the last few years in Linux Mint 17.x
gordon@gordon-linux ~ $ ssh -V
OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.8, OpenSSL 1.0.1f 6 Jan 2014
Is the output that I'm showing for dietpi what you are expecting for a Nanopi Neo with everything set to POSIX, No Language? I expected to see either en_CA or en_GB as these are the languages that are set on the dietpi.
Were you able to find the source file that created the error?
Gordon
It is the same as far as I know that I have been using for the last few years in Linux Mint 17.x
gordon@gordon-linux ~ $ ssh -V
OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.8, OpenSSL 1.0.1f 6 Jan 2014
Is the output that I'm showing for dietpi what you are expecting for a Nanopi Neo with everything set to POSIX, No Language? I expected to see either en_CA or en_GB as these are the languages that are set on the dietpi.
Were you able to find the source file that created the error?
Gordon
Re: SSH login lanuage error
Hmmm... Aren't I using the second of the two examples? E.G. the normal ssh method? That gives what should be correct output.Fourdee wrote:Gordon,
Seems related to SSH client, please see below:
https://serverfault.com/questions/79225 ... mmand-line
Edit:
OK, found how to test my shell
gordon@gordon-linux ~ $ echo $SHELL
/bin/bash
gordon@gordon-linux ~ $ echo $0
bash
I'm using the bash shell on my desktop.
Gordon
Edit2:
Just in case I'm completely out to lunch and I'm miss-understanding you.
root@DietPi:~# echo $0
bash
root@DietPi:~# echo $SHELL
/bin/bash
The dietpi shell is also bash.
Re: SSH login lanuage error
A couple of more data points for you to consider:
I've tried 2 other computers, one linux and one windows with putty and both give me the -bash: export: `#LANG=en_GB.UTF-8': not a valid identifier
error just after the PW when sshing in.
Both show POSIX when locale command is used.
Trying to follow through your scripts is beyond my pay grade, so I'm not much help there. Sorry
This is what is installed on dietpi
root@DietPi:~# locale -a
C
C.UTF-8
POSIX
en_CA.utf8
en_GB.utf8
Regards,
Gordon
I've tried 2 other computers, one linux and one windows with putty and both give me the -bash: export: `#LANG=en_GB.UTF-8': not a valid identifier
error just after the PW when sshing in.
Both show POSIX when locale command is used.
Trying to follow through your scripts is beyond my pay grade, so I'm not much help there. Sorry

This is what is installed on dietpi
root@DietPi:~# locale -a
C
C.UTF-8
POSIX
en_CA.utf8
en_GB.utf8
Regards,
Gordon
Re: SSH login lanuage error
Dan,
This may or may not be of help.
in
root@DietPi:/etc# cat bash.bashrc
------------- snip -------------------------
else
printf "%s: command not found\n" "$1" >&2
return 127
fi
}
fi
if [[ -f /etc/bash.bashrc.custom ]]; then
. /etc/bash.bashrc.custom
fi
export $(cat /etc/default/locale | grep LANG=)
#DietPi Additions
alias sudo='sudo ' # https://github.com/Fourdee/DietPi/issues/424
alias dietpi-process_tool='/DietPi/dietpi/dietpi-process_tool'
alias dietpi-letsencrypt='/DietPi/dietpi/dietpi-letsencrypt'
----------------- snip --------------------------------------------------------------------------
1)
note double brackets in
if [[ -f /etc/bash.bashrc.custom ]]; then
That section is new and wasn't in an earlier version of dietpi that I was using.
2) export $(cat /etc/default/locale | grep LANG=)
takes us to
# File generated by update-locale
LANGUAGE=en_GB.UTF-8
#LANG=en_GB.UTF-8
LC_MESSAGES=en_GB.UTF-8
You will note that the #LANG line is the line that is barfing during the login process.
What should I try?
Regards,
Gordon
This may or may not be of help.
in
root@DietPi:/etc# cat bash.bashrc
------------- snip -------------------------
else
printf "%s: command not found\n" "$1" >&2
return 127
fi
}
fi
if [[ -f /etc/bash.bashrc.custom ]]; then
. /etc/bash.bashrc.custom
fi
export $(cat /etc/default/locale | grep LANG=)
#DietPi Additions
alias sudo='sudo ' # https://github.com/Fourdee/DietPi/issues/424
alias dietpi-process_tool='/DietPi/dietpi/dietpi-process_tool'
alias dietpi-letsencrypt='/DietPi/dietpi/dietpi-letsencrypt'
----------------- snip --------------------------------------------------------------------------
1)
note double brackets in
if [[ -f /etc/bash.bashrc.custom ]]; then
That section is new and wasn't in an earlier version of dietpi that I was using.
2) export $(cat /etc/default/locale | grep LANG=)
takes us to
# File generated by update-locale
LANGUAGE=en_GB.UTF-8
#LANG=en_GB.UTF-8
LC_MESSAGES=en_GB.UTF-8
You will note that the #LANG line is the line that is barfing during the login process.
What should I try?
Regards,
Gordon
Re: SSH login lanuage error
Dan,
I uncommented the
#LANG=en_GB.UTF-8
above and rebooted
now locale shows
root@DietPi:~# locale
LANG=en_GB.UTF-8
LANGUAGE=
LC_CTYPE="en_GB.UTF-8"
LC_NUMERIC="en_GB.UTF-8"
LC_TIME="en_GB.UTF-8"
LC_COLLATE="en_GB.UTF-8"
LC_MONETARY="en_GB.UTF-8"
LC_MESSAGES="en_GB.UTF-8"
LC_PAPER="en_GB.UTF-8"
LC_NAME="en_GB.UTF-8"
LC_ADDRESS="en_GB.UTF-8"
LC_TELEPHONE="en_GB.UTF-8"
LC_MEASUREMENT="en_GB.UTF-8"
LC_IDENTIFICATION="en_GB.UTF-8"
LC_ALL=
The characters in dietpi-software have been fixed too.
Running update-locale doesn't comment the LANG out again:
root@DietPi:~# update-locale
root@DietPi:~# cat /etc/default/locale
# File generated by update-locale
LANGUAGE=en_GB.UTF-8
LANG=en_GB.UTF-8
LC_MESSAGES=en_GB.UTF-8
So there is a bug somewhere either in the setup or the files that are downloaded as this happen twice on fresh installs.
Not sure why it is en_GB rather than en_CA which was installed. How do I get en_CA ?
Gordon
I uncommented the
#LANG=en_GB.UTF-8
above and rebooted
now locale shows
root@DietPi:~# locale
LANG=en_GB.UTF-8
LANGUAGE=
LC_CTYPE="en_GB.UTF-8"
LC_NUMERIC="en_GB.UTF-8"
LC_TIME="en_GB.UTF-8"
LC_COLLATE="en_GB.UTF-8"
LC_MONETARY="en_GB.UTF-8"
LC_MESSAGES="en_GB.UTF-8"
LC_PAPER="en_GB.UTF-8"
LC_NAME="en_GB.UTF-8"
LC_ADDRESS="en_GB.UTF-8"
LC_TELEPHONE="en_GB.UTF-8"
LC_MEASUREMENT="en_GB.UTF-8"
LC_IDENTIFICATION="en_GB.UTF-8"
LC_ALL=
The characters in dietpi-software have been fixed too.
Running update-locale doesn't comment the LANG out again:
root@DietPi:~# update-locale
root@DietPi:~# cat /etc/default/locale
# File generated by update-locale
LANGUAGE=en_GB.UTF-8
LANG=en_GB.UTF-8
LC_MESSAGES=en_GB.UTF-8
So there is a bug somewhere either in the setup or the files that are downloaded as this happen twice on fresh installs.
Not sure why it is en_GB rather than en_CA which was installed. How do I get en_CA ?
Gordon