#!/bin/sh
#-------------------------------------------------------------------------------
# charon_menu_putty
#-------------------------------------------------------------------------------
# Copyright (C) 2013-2022 STROMASYS.
# All rights reserved.
#
#set -x
VERSION=1.1

. `dirname $0`/charon_common
. `dirname $0`/charon_common_menu


#    echo "[44m[37m Checking... [0m"

echo
display_header "PuTTY - settings recommendations"

cat <<EOF

To have a correct line drawing using PuTTY, please use one of the following
solutions:

[7m Solution#1 - using xterm settings [0m

Before opening the terminal session, load the saved session you want to use
and update the following parameters:
- Connection -> Data -> Terminal-type string can be set to either "xterm" or
  "vt200"
- Window -> Translation -> Remote Character set: the default ISO-8859-1

[36mNote:[0m
It is possible some characters will not be displayed correctly using this
method. Test then the Solution#2 detailed further.
EOF
Press_Enter

cat <<EOF
[7m Solution#2 - using putty and Linux locale settings [0m

[36mOn the Linux host:[0m
Add these lines in your .bashrc file (if you're using bash):

test "$TERM" = "putty" && export LC_ALL=C || export LC_ALL=en_US.utf8
export TERM=xterm

[36mIn putty:[0m
- Connection -> Data -> Terminal-type string "putty"
- Window -> Translation -> Remote Character set: the default ISO-8859-1
EOF
Press_Enter

cat <<EOF
[7m Font and rendering [0m

The default font does not display boxes correctly. If you want to have a
better look, please change the font in the "Window -> Appearance" option and
select either Consolas, Lucida Console or Terminal fonts rather than Courier
New.
EOF
Press_Enter

exit
