-
-
Notifications
You must be signed in to change notification settings - Fork 502
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix for dumb or unset TERM #2
Conversation
This is a fix for when $TERM is not set or set to "dumb". References: http://stackoverflow.com/questions/19425727/how-to-remove-term-environment-variable-not-set and http://askubuntu.com/questions/80686/term-set-to-dumb-causes-problems-with-suspend
@@ -56,6 +56,11 @@ | |||
#///////////////////////////////////////////////////////////////////////////////////// | |||
# Main Loop | |||
#///////////////////////////////////////////////////////////////////////////////////// | |||
export TERM=${TERM:-dumb} | |||
if (( "$TERM" == "dumb" )); then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exit also gets triggered with dropbear logins.
Heres the value of TERM:
export TERM=${TERM:-dumb}; echo -e "$TERM"
xterm
I tested with the following, exit doesnt get triggered with dropbear:
if [ "$TERM" = "dumb" ]; then
Tested with the following to confirm trigger works (exit got triggered):
if [ "$TERM" = "xterm" ]; then
If you can test with openssh server, just to verify:
if [ "$TERM" = "dumb" ]; then
Thanks tdaitx.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, exit is triggered on scp with openssh server and not triggered on the usual ssh login (just it should be). Thanks!
Thanks tdaitx, I'll add this to the master branch manually. I'am unable to change/modify the code in this request as i dont have access to "patch-2". Also moved to the login script line 39. This should prevent any further SCP connection issues down the road. |
Updating Testing with Main Distro
Link changed from phpBB to dietpi.com/docs #2
This is a fix for when
$TERM
is unset or set to dumb - eg. the dumb value is used by scp. For some reasonclear
complains that the TERM variable is not properly set (it is) and causes an error:With the fix I am able to properly copy the file. I'm using the openssh-server package, I haven't tested it with the default dropbear.
Note that only exporting
TERM
is not enough, all output should be disabled otherwise scp will fail.Reference:
export TERM=${TERM:-dumb}