From owner-freebsd-stable@freebsd.org Fri Dec 22 06:22:52 2017 Return-Path: Delivered-To: freebsd-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 98129E8221B for ; Fri, 22 Dec 2017 06:22:52 +0000 (UTC) (envelope-from emz@norma.perm.ru) Received: from elf.hq.norma.perm.ru (mail.norma.perm.ru [IPv6:2a00:7540:1::5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.norma.perm.ru", Issuer "Vivat-Trade UNIX Root CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 1ADED69C98 for ; Fri, 22 Dec 2017 06:22:51 +0000 (UTC) (envelope-from emz@norma.perm.ru) Received: from bsdrookie.norma.com. (asterisk.enaza.ru [46.146.220.88]) by elf.hq.norma.perm.ru (8.15.2/8.15.2) with ESMTPS id vBM6MgPc051402 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO) for ; Fri, 22 Dec 2017 11:22:42 +0500 (YEKT) (envelope-from emz@norma.perm.ru) Subject: Re: mc, xterm-clear, Ctrl-O and Home/End dilemma To: freebsd-stable@freebsd.org References: <5915cdcf-c906-630d-ba5a-8271d0ae4435@norma.perm.ru> From: "Eugene M. Zheganin" Message-ID: <77e8b9fe-3ccb-2f90-e646-172d7419a382@norma.perm.ru> Date: Fri, 22 Dec 2017 11:22:42 +0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <5915cdcf-c906-630d-ba5a-8271d0ae4435@norma.perm.ru> Content-Type: text/plain; charset=koi8-r; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Spamd-Result: default: False [-1.10 / 25.00] BAYES_HAM(-3.00)[100.00%] RBL_SPAMHAUS_PBL(2.00)[88.220.146.46.zen.spamhaus.org : 127.0.0.10] R_DKIM_NA(0.00)[] RCPT_COUNT_ONE(0.00)[1] MIME_GOOD(-0.10)[text/plain] ARC_NA(0.00)[] FROM_EQ_ENVFROM(0.00)[] FROM_HAS_DN(0.00)[] TO_DN_NONE(0.00)[] RCVD_TLS_ALL(0.00)[] R_SPF_SOFTFAIL(0.00)[~all] MID_RHS_MATCH_FROM(0.00)[] RCVD_COUNT_TWO(0.00)[2] RECEIVED_SPAMHAUS(0.00)[88.220.146.46.zen.spamhaus.org] DMARC_NA(0.00)[perm.ru] TO_MATCH_ENVRCPT_ALL(0.00)[] X-Rspamd-Server: localhost X-Rspamd-Scan-Time: 5.46 X-Rspamd-Queue-ID: vBM6MgPc051402 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Dec 2017 06:22:52 -0000 Hi, On 21.12.2017 23:20, Eugene M. Zheganin wrote: > Hi, > > So, there's a puzzle of minor issues and I wanted to ask how you guys > deal with it. > > - with standard ncurses misc/mc there's no borders in mc in putty, and > Ctrl-O flushes the output beneath panels. > > -with slang misc/mc Ctrl-O flushes the output beneath panels (and I > lived with this through years, but then discovered xterm-clear). > > - with slang and xterm-clear Home/End doesn't work in putty. > everything else is fine, but this hurts. > > I use my FreeBSD desktop at work and from home wvia putty, so I really > want to solve this without learning keays each time (and it seems like > they aren't save on "Save setup". > > Ideas ? > > So, I figured it out, thanks to https://midnight-commander.org/ticket/2633 two things should be done on each FreeBSD mc is ran on to not ruin other ssh sessions: - a wrapper that will reside in PATH earlier than mc binary: #!/bin/sh # # simple knob to fix mc Ctrl-O without ruining remote Linux sshs # if [ $TERM = "xterm" ]; then { TERM=xterm-clear } fi /usr/local/bin/mc $* - a fix to /usr/local/share/mc/mc.lib: [terminal:xterm-clear] copy=xterm Then everything works, remote ssh sessions are not affected (like Linuxes/other OSes that don't have xterm-clear), putty works fine, Home/End working fine. Eugene.