From owner-freebsd-stable@freebsd.org Wed Jan 25 18:25:26 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 A9776CC1E19 for ; Wed, 25 Jan 2017 18:25:26 +0000 (UTC) (envelope-from Ephaeton@gmx.net) Received: from mout.gmx.net (mout.gmx.net [212.227.15.19]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mout.gmx.net", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 22D34E2 for ; Wed, 25 Jan 2017 18:25:25 +0000 (UTC) (envelope-from Ephaeton@gmx.net) Received: from hephaistos.local ([79.208.137.127]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0Ljqgb-1bvBUj0iBl-00bsTl; Wed, 25 Jan 2017 19:25:16 +0100 Received: by hephaistos.local (Postfix, from userid 1000) id A007C297CDF6; Wed, 25 Jan 2017 19:25:14 +0100 (CET) Date: Wed, 25 Jan 2017 19:25:14 +0100 From: "Martin S. Weber" To: Brandon Allbery Cc: "Eugene M. Zheganin" , freebsd-stable Subject: Re: reset not working like 70% of the time Message-ID: <20170125182514.GB1359@hephaistos.local> Mail-Followup-To: Brandon Allbery , "Eugene M. Zheganin" , freebsd-stable References: <5888754F.2040901@norma.perm.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.7.2 (2016-11-26) X-Provags-ID: V03:K0:vBtPaIKAzxs2/UEOHY75gNVPIbPKgO13SqzxtpnjSlE1RriAT/r YQCUhg5WfbskhRYBRgkABrD9695tNaSeGFRh1Mutt6psG7GNJ/VgtMYm9oWikk9eribIe6N q5F939bCin2aNjUFnXwZiCV8cLVMPJybNU1/VkRAmNWJ7EoJybi3orxLzCE3a8QXicAg108 QNk3FJv54AGrV/CXLStUg== X-UI-Out-Filterresults: notjunk:1;V01:K0:qUFyV3YChyY=:1Py340kD2e+s2PC08uHh45 T1RTXN8jJJy3FJQfUgR/HhMmvkRmg/V1Zo+4U89ze4l4elufmePgrtC/B66wgXU5Ob6Wrxq5v 5fyiNQWRmGvmP86YuT9VOwQ1lTOhaeXIkTZlgriYhY2+jYkqhi/or7blqDBEpOraddbHPratq pL7XDt5xxHy5mXtR5xwBMnzgzaqqrIQRka4sXNfJwf1k6djSUAd87LdwBLDd8ILaKO18vlF4T PaPa1uxby9XMVCtpDYhOc4PwDiGTUCfUfGTb0xH6IBXps1WAPcIN/bpIbGK+Y4/ZWe4nP6DmQ Xyv3Jpgp9VUi+goVuM98eePfwly82ImNPtbo1/MBr3nXuGq6mk4rnPHFF97JqTahaZeuecOBi LIjn4RdNj6AbzdxtuJ2JgZ4cGjeOqmcT2bMcCGTUbxV9JyvciDMQpg0+NjZhefovNvJg1faFp +d7C+qwdUlgvRKm9OmMr5x0trxTt/0GeDxu99uKymRe+Pa/0m5ztRWeC9LjBZmJ9DHJ9b3km1 XkP1ls+RV1aX4lXn+n4oR0022gMBp5SdUjqIrvxf3j1EPskxdo3ZJuZxougHfquHRx0hTIl2h eVJ/9cEpMhfsuEKts4JmLQn3mQ62ldmLG33Zt8ThNbKUtIOdf7RPS06ub+fzwm5B0uzVYkX42 N/Qv7PrJIDmNhsedBJ8ZrXTEFfOCMjayrV0srXHZ9KLsYDUtA25de/wcHy7T84XTeuccyxsgO ekFUjgpl5CerJ0l99DnnlSlAT85EOKeYGymdjp5WUnSO0AEwzc3oVST3xBU= X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Jan 2017 18:25:26 -0000 On 2017-01-25 12:59:27, Brandon Allbery wrote: > On Wed, Jan 25, 2017 at 4:52 AM, Eugene M. Zheganin > wrote: > > > does anyone suffer from this too ? Right now (and for several last > > years) a 100% decent way to reset a terminal session (for instance, > > after a connection reset, after acidentally displaying a binary file > > with symbols that are treated as terminal control sequence, after > > breaking a cu session, etc) is to launch midnight commander and then > > quit from it. And the reset is working like in 30% of cases only. Unlike > > in Linux, where it's 100% functional. > > > > Using an application like that to reset the terminal is dubious at best. > You are at the mercy of how exactly it does terminal conditioning, and > nobody makes any promises about its actual behavior. In fact it could be > argued that, if it does not put the terminal back exactly the way it found > it, the application is broken. But this is actually impossible to do > correctly as the application can't know the terminal's full ANSI X3.64 > state. Additionally there's a bit of a "religious issue" around whether > full screen applications use xterm's alternate screen (and whether xterm > even has that enabled) which will save and restore more of the X3.64 state > around the application. > > "tput reset; stty sane" (or just "reset") should usually put the terminal > into a sensible state. If it doesn't, figure out whether the part that > isn't happening is a termios or a terminfo setting and focus on that part. > Check if xterm has "Enable alternate screen switching" checked on the > control-middle button menu. OP stated he's using konsole (KDE wannabe xterm). OP, try and create a minimal file with script that doesn't clean up your terminal on reset(1). Make sure it doesn't contain confidential information. Publish your environment (env | grep TERM) and this script file somewhere. Let others know the URL. Then we can actually begin to answer your original question, whether or not we see this as well. You could also try to reproduce your problems with different terminal emulators (xterm, freebsd console) Regards, -Martin