Also a would like to know where is written the code that run the command that create this line when i login with ssh. Linux octopi 5.15.56-v8+ #1575 SMP PREEMPT Fri Jul 22 20:31:26 BST 2022 aarch64
It’s right in the file /etc/bashrc.d/dietpi.bash. Every time you open a terminal, this config file, besides some others, is loaded.
Line 74 in my case is term="/${TERM::1}/$TERM", but let’s have a look at yours:
sed -n 74p /etc/bashrc.d/dietpi.bash
This is part of
# Workaround if SSH client sets an unsupported $TERM string:
term="/${TERM::1}/$TERM"
if [[ $SSH_TTY && ! -f /lib/terminfo$term && ! -f /usr/share/terminfo$term && ! -f ~/.terminfo$term && ! -f /etc/terminfo$term ]]
then
So maybe another unsupported string triggered this?
Hi, sorry I didn’t answer earlier, I wasn’t home this week.
I tried doing what you say but it keeps giving the same error. Could it be because I use zsh? I forgot to mention that.
Temporarily I commented out that whole block of code but it would be interesting to understand why it doesn’t work.
Thanks @Joulinar@Jappe Update:
I tried to switch to the bash shell and the original file is working perfectly. But when I use zsh it doesn’t work anymore, it only work if i comment like this: Hastebin: Send and Save Text or Code Snippets for Free | Toptal®
The problem is that i don’t know what is the difference between zsh and bash that create the problem.
Some zsh login script must contain a line to source /etc/bash.bashrc which loads /etc/bashrc.d on DietPi. Of course /etc/bash.bashrc is intended for bash, so shouldn’t be loaded by other shells, if you want to rule out compatibility issues.
cat: .zprofile: No such file or directory
cat: .zlogin: No such file or directory
cat: /etc/zshenv: No such file or directory
cat: /etc/zprofile: No such file or directory
cat: /etc/zshrc: No such file or directory
cat: /etc/zlogin: No such file or directory
Ok so i think that i will just comment the block of code that block the execution of bashrc.d
The other way round: Comment/remove the line which does load /etc/bash.bashrc. But actually I can’t find it in your output . Does zsh have a debug flag so that each executed command and sourced script is shown on login?